summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2011-06-24 19:44:05 -0600
committerRob Crittenden <rcritten@redhat.com>2011-06-28 00:11:04 -0400
commitcae6f1511ef81c645e1bf873b2ae975190ea5c4c (patch)
treee9446aad0a8ab1eb02b8899eb15c3f7fe36e9c3a
parent89c67c3ad97f858ebde38a34a7b106379371c125 (diff)
downloadfreeipa-cae6f1511ef81c645e1bf873b2ae975190ea5c4c.zip
freeipa-cae6f1511ef81c645e1bf873b2ae975190ea5c4c.tar.gz
freeipa-cae6f1511ef81c645e1bf873b2ae975190ea5c4c.tar.xz
memory leak in ipa_winsync_get_new_ds_user_dn_cb
The new_dn_string passed into this function is malloc'd. It must be freed before we reassign the value.
-rw-r--r--daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
index 4b81a2e..48c45c1 100644
--- a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
@@ -404,6 +404,7 @@ ipa_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry,
}
ldap_rdn2str(ldn[0], &rdn, LDAP_DN_FORMAT_LDAPV3);
+ slapi_ch_free_string(new_dn_string);
*new_dn_string = slapi_ch_smprintf("%s,%s", rdn, slapi_sdn_get_dn(ds_suffix));
ldap_dnfree(ldn);
ldap_memfree(rdn);