From 8e00e9d7a6114089fc176bc3446c6c97a01543d6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Mar 2007 02:43:33 +0000 Subject: r21609: Fix memory leaks in error code paths (and one in winbindd_group.c). Patch from Zack Kirsch . Jeremy. (This used to be commit df07a662e32367a52c1e8473475423db2ff5bc51) --- source3/nsswitch/idmap_ldap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/nsswitch/idmap_ldap.c') diff --git a/source3/nsswitch/idmap_ldap.c b/source3/nsswitch/idmap_ldap.c index 8cccbcecf4..f74372ecea 100644 --- a/source3/nsswitch/idmap_ldap.c +++ b/source3/nsswitch/idmap_ldap.c @@ -1283,6 +1283,9 @@ static NTSTATUS idmap_ldap_set_mapping(struct idmap_domain *dom, const struct id sid, (unsigned long)map->xid.id, type)); DEBUG(0, ("ldap_set_mapping_internals: Error was: %s (%s)\n", ld_error ? ld_error : "(NULL)", ldap_err2string (rc))); + if (ld_error) { + ldap_memfree(ld_error); + } ret = NT_STATUS_UNSUCCESSFUL; goto done; } -- cgit