summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-12-14 16:41:39 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-12-14 16:41:39 +0000
commit006ed972e5b972a4aeacc091d51af2278d17eb6b (patch)
treec9c9d8e4b6e9ba991d32adecc9f62bb39d483b92
parent37108ce15eb573d907b011e9c01cc4995f87624a (diff)
potential fix for double free() bug like in nss_ldap (Debian bug #366172)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@497 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/myldap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index 56bd56d..6d977d7 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -236,12 +236,12 @@ static void myldap_search_free(MYLDAP_SEARCH *search)
/* free any search entries */
if (search->entry!=NULL)
myldap_entry_free(search->entry);
- /* free read messages */
- if (search->msg!=NULL)
- ldap_msgfree(search->msg);
/* clean up cookie */
if (search->cookie!=NULL)
ber_bvfree(search->cookie);
+ /* free read messages */
+ if (search->msg!=NULL)
+ ldap_msgfree(search->msg);
/* free the storage we allocated */
free(search);
}