From 3784f889d90cb5308b8e9b08f6493db61ae2e5bb Mon Sep 17 00:00:00 2001 From: stroeder Date: Tue, 26 Jan 2016 11:12:54 +0000 Subject: [PATCH] LDAPObject.unbind_ext() now removed class attribute LDAPObject._l to completely invalidate C wrapper object --- CHANGES | 6 +++++- Lib/ldap/ldapobject.py | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 163116d..062dcbd 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,10 @@ Released 2.4.26 2016-xx-xx Changes since 2.4.25: +Lib/ +* LDAPObject.unbind_ext() now removed class attribute + LDAPObject._l to completely invalidate C wrapper object + Modules/ * Fixed #69 Segmentation fault on whoami_s after unbind (thanks to Christian Heimes and Petr Viktorin) @@ -1244,4 +1248,4 @@ Released 2.0.0pre02 2002-02-01 ---------------------------------------------------------------- Released 1.10alpha3 2000-09-19 -$Id: CHANGES,v 1.372 2016/01/26 11:01:08 stroeder Exp $ +$Id: CHANGES,v 1.373 2016/01/26 11:12:54 stroeder Exp $ diff --git a/Lib/ldap/ldapobject.py b/Lib/ldap/ldapobject.py index 76b5c70..0fe2fbb 100644 --- a/Lib/ldap/ldapobject.py +++ b/Lib/ldap/ldapobject.py @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -\$Id: ldapobject.py,v 1.151 2016/01/18 10:38:26 stroeder Exp $ +\$Id: ldapobject.py,v 1.152 2016/01/26 11:12:54 stroeder Exp $ Compability: - Tested with Python 2.0+ but should work with Python 1.5.x @@ -623,7 +623,9 @@ def unbind_ext(self,serverctrls=None,clientctrls=None): The unbind and unbind_s methods are identical, and are synchronous in nature """ - return self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) + res = self._ldap_call(self._l.unbind_ext,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) + del self._l + return res def unbind_ext_s(self,serverctrls=None,clientctrls=None): msgid = self.unbind_ext(serverctrls,clientctrls)