Date: Fri, 24 Mar 2006 05:17:29 +0000 From: Xin LI <delphij@freebsd.org> To: FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/94725: [PATCH] Update net/py-ldap2 to 2.0.11 Message-ID: <20060324051729.GA35108@hub.freebsd.org> In-Reply-To: <200603201030.k2KAUGri078554@freefall.freebsd.org> References: <200603201024.k2KAOIB3039118@tarsier.delphij.net> <200603201030.k2KAUGri078554@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Additionally this patch should be placed into files/ directory in order to elminate a memory leak: Index: LDAPObject.c =================================================================== RCS file: /cvsroot/python-ldap/python-ldap/Modules/LDAPObject.c,v retrieving revision 1.72 diff -u -r1.72 LDAPObject.c --- Modules/LDAPObject.c 11 Mar 2006 21:05:57 -0000 1.72 +++ Modules/LDAPObject.c 23 Mar 2006 21:48:33 -0000 @@ -971,8 +971,16 @@ if (pmsg == NULL) { retval = NULL; } else { - retval = Py_BuildValue("(OOiO)", result_str, pmsg, res_msgid, - pyctrls ? pyctrls : PyList_New(0)); + if (pyctrls != NULL) { + retval = Py_BuildValue("(OOiO)", result_str, pmsg, res_msgid, + pyctrls); + } else { + PyObject *pNewList = PyList_New(0); + retval = Py_BuildValue("(OOiO)", result_str, pmsg, res_msgid, + pNewList); + Py_DECREF(pNewList); + } + if (pmsg != Py_None) { Py_DECREF(pmsg); } Note that this patch was submitted to the original author but got response. Cheers,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060324051729.GA35108>