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.
This commit is contained in:
Rich Megginson 2011-06-24 19:44:05 -06:00 committed by Rob Crittenden
parent 89c67c3ad9
commit cae6f1511e

View File

@ -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);