zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From he...@apache.org
Subject svn commit: r1351542 - in /zookeeper/branches/branch-3.3: CHANGES.txt src/contrib/zkpython/src/c/zookeeper.c
Date Tue, 19 Jun 2012 00:21:21 GMT
Author: henry
Date: Tue Jun 19 00:21:21 2012
New Revision: 1351542

URL: http://svn.apache.org/viewvc?rev=1351542&view=rev
Log:
ZOOKEEPER-1431. zkpython async calls leak memory (Kapil Thangavelu and Andre Cruz 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=1351542&r1=1351541&r2=1351542&view=diff
==============================================================================
--- zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.3/CHANGES.txt Tue Jun 19 00:21:21 2012
@@ -20,6 +20,8 @@ BUGFIXES:
   ZOOKEEPER-1318. In Python binding, get_children (and get and exists, and probably others)
   with expired session doesn't raise exception properly (henryr via michim)
 
+  ZOOKEEPER-1431. zkpython async calls leak memory (Kapil Thangavelu and Andre Cruz 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=1351542&r1=1351541&r2=1351542&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 Tue Jun 19 00:21:21
2012
@@ -437,6 +437,7 @@ void watcher_dispatch(zhandle_t *zzh, in
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) {
     PyErr_Print();
   }
+  Py_DECREF(arglist);
   if (pyw->permanent == 0 && (type != ZOO_SESSION_EVENT || state < 0)) {
     free_pywatcher(pyw);
   }
@@ -458,6 +459,7 @@ void void_completion_dispatch(int rc, co
   PyObject *arglist = Py_BuildValue("(i,i)", pyw->zhandle, rc);
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL)
     PyErr_Print();
+  Py_DECREF(arglist);
   free_pywatcher(pyw);
   PyGILState_Release(gstate);
 }
@@ -475,9 +477,9 @@ void stat_completion_dispatch(int rc, co
   PyObject *pystat = build_stat(stat);
   PyObject *arglist = Py_BuildValue("(i,i,O)", pyw->zhandle,rc, pystat);
   Py_DECREF(pystat);
-
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL)
     PyErr_Print();
+  Py_DECREF(arglist);
   free_pywatcher(pyw);
   PyGILState_Release(gstate);
 }
@@ -499,6 +501,7 @@ void data_completion_dispatch(int rc, co
 
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL)
     PyErr_Print();
+  Py_DECREF(arglist);
   free_pywatcher(pyw);
   PyGILState_Release(gstate);
 }
@@ -519,6 +522,7 @@ void strings_completion_dispatch(int rc,
       PyObject *arglist = Py_BuildValue("(i,i,O)", pyw->zhandle, rc, pystrings);   
       if (arglist == NULL || PyObject_CallObject((PyObject*)callback, arglist) == NULL)
         PyErr_Print();
+      Py_DECREF(arglist);
     }
   else
     PyErr_Print();
@@ -541,6 +545,7 @@ void string_completion_dispatch(int rc, 
   PyObject *arglist = Py_BuildValue("(i,i,s)", pyw->zhandle,rc, value);
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL)
     PyErr_Print();
+  Py_DECREF(arglist);
   free_pywatcher(pyw);
   PyGILState_Release(gstate);
 }
@@ -566,6 +571,7 @@ void acl_completion_dispatch(int rc, str
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) {
     PyErr_Print();
   }
+  Py_DECREF(arglist);
   free_pywatcher(pyw);
   PyGILState_Release(gstate);
 }



Mime
View raw message