From 8e0b96e46884c5048082f5ffff5cec37443f8003 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 21 Jan 2016 01:34:59 +0100 Subject: 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. --- service_passwords.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( -- cgit v1.2.3-1-g7c22