diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-21 01:34:59 +0100 |
---|---|---|
committer | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-21 01:34:59 +0100 |
commit | 8e0b96e46884c5048082f5ffff5cec37443f8003 (patch) | |
tree | 89365778cc576376032f08a173323fb572bb216c | |
parent | 015a0744ac127b28c3b381ba887f85e5ba8cd85c (diff) | |
download | ldap-plugin-8e0b96e46884c5048082f5ffff5cec37443f8003.tar.gz ldap-plugin-8e0b96e46884c5048082f5ffff5cec37443f8003.tar.bz2 ldap-plugin-8e0b96e46884c5048082f5ffff5cec37443f8003.zip |
Fix memory leak
slapu_pblock_set copies the DN into the pblock, because it first has to do a
normalization. So we do not need to create a copy of the supplied value and
have to free the supplied string afterwards.
-rw-r--r-- | service_passwords.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service_passwords.c b/service_passwords.c index 5a4f1c5..a8e2700 100644 --- a/service_passwords.c +++ b/service_passwords.c @@ -491,7 +491,7 @@ static int pre_bind(Slapi_PBlock *pb) if (auth_with_password_fallback(dn, credentials) == 0) { /* auth success: set connection info */ - rc |= slapi_pblock_set(pb, SLAPI_CONN_DN, slapi_ch_strdup(dn)); + rc |= slapi_pblock_set(pb, SLAPI_CONN_DN, dn); if (rc != 0) { slapi_log_error( |