Return-Path: X-Original-To: apmail-zookeeper-commits-archive@www.apache.org Delivered-To: apmail-zookeeper-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D23ABC980 for ; Tue, 19 Jun 2012 00:14:21 +0000 (UTC) Received: (qmail 23092 invoked by uid 500); 19 Jun 2012 00:14:21 -0000 Delivered-To: apmail-zookeeper-commits-archive@zookeeper.apache.org Received: (qmail 23043 invoked by uid 500); 19 Jun 2012 00:14:21 -0000 Mailing-List: contact commits-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ Delivered-To: mailing list commits@zookeeper.apache.org Received: (qmail 23032 invoked by uid 99); 19 Jun 2012 00:14:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 00:14:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 00:14:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 490252388C3D for ; Tue, 19 Jun 2012 00:14:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1351538 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/contrib/zkpython/src/c/zookeeper.c Date: Tue, 19 Jun 2012 00:14:00 -0000 To: commits@zookeeper.apache.org From: henry@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120619001400.490252388C3D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: henry Date: Tue Jun 19 00:13:59 2012 New Revision: 1351538 URL: http://svn.apache.org/viewvc?rev=1351538&view=rev Log: ZOOKEEPER-1431. zkpython async calls leak memory (Kapil Thangavelu and Andre Cruz via henryr) Modified: zookeeper/branches/branch-3.4/CHANGES.txt zookeeper/branches/branch-3.4/src/contrib/zkpython/src/c/zookeeper.c Modified: zookeeper/branches/branch-3.4/CHANGES.txt URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1351538&r1=1351537&r2=1351538&view=diff ============================================================================== --- zookeeper/branches/branch-3.4/CHANGES.txt (original) +++ zookeeper/branches/branch-3.4/CHANGES.txt Tue Jun 19 00:13:59 2012 @@ -53,6 +53,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) + IMPROVEMENTS: ZOOKEEPER-1389. it would be nice if start-foreground used exec $JAVA Modified: zookeeper/branches/branch-3.4/src/contrib/zkpython/src/c/zookeeper.c URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zkpython/src/c/zookeeper.c?rev=1351538&r1=1351537&r2=1351538&view=diff ============================================================================== --- zookeeper/branches/branch-3.4/src/contrib/zkpython/src/c/zookeeper.c (original) +++ zookeeper/branches/branch-3.4/src/contrib/zkpython/src/c/zookeeper.c Tue Jun 19 00:13:59 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); }