You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by he...@apache.org on 2012/03/31 00:31:32 UTC

svn commit: r1307646 - in /zookeeper/branches/branch-3.3: CHANGES.txt src/contrib/zkpython/src/c/zookeeper.c

Author: henry
Date: Fri Mar 30 22:31:31 2012
New Revision: 1307646

URL: http://svn.apache.org/viewvc?rev=1307646&view=rev
Log:
ZOOKEEPER-1395. node-watcher double-free redux (Mike Lundy via henryr)

Modified:
    zookeeper/branches/branch-3.3/CHANGES.txt
    zookeeper/branches/branch-3.3/src/contrib/zkpython/src/c/zookeeper.c

Modified: zookeeper/branches/branch-3.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.3/CHANGES.txt?rev=1307646&r1=1307645&r2=1307646&view=diff
==============================================================================
--- zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.3/CHANGES.txt Fri Mar 30 22:31:31 2012
@@ -4,8 +4,10 @@ Backward compatible changes:
 BUGFIXES:
 
   ZOOKEEPER-1403. zkCli.sh script quoting issue (James Page via phunt)
+
   ZOOKEEPER-1433. improve ZxidRolloverTest (test seems flakey) (phunt via henryr)
-   
+
+  ZOOKEEPER-1395. node-watcher double-free redux (Mike Lundy via henryr)   
 
 Release 3.3.5 - 2012-03-18
 Backward compatible changes:

Modified: zookeeper/branches/branch-3.3/src/contrib/zkpython/src/c/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.3/src/contrib/zkpython/src/c/zookeeper.c?rev=1307646&r1=1307645&r2=1307646&view=diff
==============================================================================
--- zookeeper/branches/branch-3.3/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ zookeeper/branches/branch-3.3/src/contrib/zkpython/src/c/zookeeper.c Fri Mar 30 22:31:31 2012
@@ -436,7 +436,7 @@ void watcher_dispatch(zhandle_t *zzh, in
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) {
     PyErr_Print();
   }
-  if (pyw->permanent == 0 && (type != ZOO_SESSION_EVENT || is_unrecoverable(zzh) == ZINVALIDSTATE)) {
+  if (pyw->permanent == 0 && (type != ZOO_SESSION_EVENT || state < 0)) {
     free_pywatcher(pyw);
   }
   PyGILState_Release(gstate);