diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-16 02:18:33 +0100 |
---|---|---|
committer | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-16 02:18:33 +0100 |
commit | 5fd72e46773800cc556c342583c2ef9212adb2dd (patch) | |
tree | 95f83e870f415fc936ad946e6f829024a881ddeb | |
parent | 0efbbf03ab6b2d8ca2ce51c29c25833c57494c62 (diff) | |
download | ldap-plugin-5fd72e46773800cc556c342583c2ef9212adb2dd.tar.gz ldap-plugin-5fd72e46773800cc556c342583c2ef9212adb2dd.tar.bz2 ldap-plugin-5fd72e46773800cc556c342583c2ef9212adb2dd.zip |
Do not free the return value of slapi_attr_get_valueset
slapi_attr_get_valueset returns a pointer from the Slapi_Attr* argument. If you free
the Slapi_ValueSet and the Slapi_Attr structures the valuesset is freed twice and
this causes memory corruption and segfaults later.
-rw-r--r-- | service_passwords.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/service_passwords.c b/service_passwords.c index a1d8f6d..316cfc7 100644 --- a/service_passwords.c +++ b/service_passwords.c @@ -108,12 +108,9 @@ static int dn_contains_uid(const char *dn) if (rc != 0 || slapi_valueset_count(uid_values) == 0) { /* empty uid value */ rc = 1; - goto fail2; + goto fail1; } -fail2: - slapi_valueset_free(uid_values); - fail1: slapi_entry_free(entry); |