diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-10-25 20:25:21 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-10-25 20:25:21 +0000 |
commit | 22a7e5edae37bc3b5064e6cc895e425775a24bbc (patch) | |
tree | 2550fcf98cbfaa96021a7863be5d31f6fb34669f /nslcd/ldap-nss.c | |
parent | e0a2dc15e130a6a2412ae6854199690285b5303f (diff) |
fix a memory leak, not storing search entries so they could be freed later on
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@453 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ldap-nss.c')
-rw-r--r-- | nslcd/ldap-nss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nslcd/ldap-nss.c b/nslcd/ldap-nss.c index 3e1a1d0..17b91a8 100644 --- a/nslcd/ldap-nss.c +++ b/nslcd/ldap-nss.c @@ -1022,7 +1022,8 @@ MYLDAP_ENTRY *myldap_get_entry(MYLDAP_SEARCH *search) if (stat==NSS_STATUS_SUCCESS) { /* we have a normal entry, return it */ - return myldap_entry_new(search,search->context.ec_res); + search->entry=myldap_entry_new(search,search->context.ec_res); + return search->entry; } else if ( (stat==NSS_STATUS_NOTFOUND) && (search->context.ec_cookie!=NULL) && |