Bug 94725 - [PATCH] Update net/py-ldap2 to 2.0.11
Summary: [PATCH] Update net/py-ldap2 to 2.0.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Vsevolod Stakhov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-20 10:30 UTC by Xin LI
Modified: 2006-04-05 09:05 UTC (History)
1 user (show)

See Also:


Attachments
patch-py-ldap2 (2.21 KB, text/plain)
2006-03-20 10:30 UTC, Xin LI
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer freebsd_triage 2006-03-20 10:30:16 UTC
	The proposed patch updates py-ldap2 to 2.0.11:
	 - Update version in the ports
	 - Do not depend on OpenLDAP 2.2, this port works fine
	   with 2.3.x series. (*)
	 - Reorganize REPLACE_ARGS

	Maintainer cc'ed.

	* We should have a better way to handle with OpenLDAP
	  dependencies, though.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-03-20 10:36:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vsevolod

Over to maintainer
Comment 2 Xin LI freebsd_committer freebsd_triage 2006-03-24 05:17:29 UTC
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,
Comment 3 Sergey Matveychuk freebsd_committer freebsd_triage 2006-04-05 09:05:18 UTC
State Changed
From-To: open->closed

Committed. Thanks!