summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/idmap_ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nsswitch/idmap_ldap.c')
-rw-r--r--source/nsswitch/idmap_ldap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/nsswitch/idmap_ldap.c b/source/nsswitch/idmap_ldap.c
index 8cccbcecf4c..f74372eceab 100644
--- a/source/nsswitch/idmap_ldap.c
+++ b/source/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;
}