diff --git a/CHANGES b/CHANGES index fedd42f..163116d 100644 --- a/CHANGES +++ b/CHANGES @@ -4,8 +4,8 @@ Released 2.4.26 2016-xx-xx Changes since 2.4.25: Modules/ -* - (thanks to ) +* Fixed #69 Segmentation fault on whoami_s after unbind + (thanks to Christian Heimes and Petr Viktorin) ---------------------------------------------------------------- Released 2.4.25 2016-01-18 @@ -1244,4 +1244,4 @@ Released 2.0.0pre02 2002-02-01 ---------------------------------------------------------------- Released 1.10alpha3 2000-09-19 -$Id: CHANGES,v 1.371 2016/01/26 10:43:24 stroeder Exp $ +$Id: CHANGES,v 1.372 2016/01/26 11:01:08 stroeder Exp $ diff --git a/Modules/LDAPObject.c b/Modules/LDAPObject.c index 725ab37..10f166a 100644 --- a/Modules/LDAPObject.c +++ b/Modules/LDAPObject.c @@ -1,5 +1,5 @@ /* See http://www.python-ldap.org/ for details. - * $Id: LDAPObject.c,v 1.93 2016/01/18 12:33:07 stroeder Exp $ */ + * $Id: LDAPObject.c,v 1.94 2016/01/26 11:01:08 stroeder Exp $ */ #include "common.h" #include "patchlevel.h" @@ -1180,6 +1180,7 @@ l_ldap_whoami_s( LDAPObject* self, PyObject* args ) int ldaperror; if (!PyArg_ParseTuple( args, "|OO", &serverctrls, &clientctrls)) return NULL; + if (not_valid(self)) return NULL; if (!PyNone_Check(serverctrls)) { if (!LDAPControls_from_object(serverctrls, &server_ldcs))