From 062c1a89d4438bf9e89d6e999b766a2387a28db6 Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Jun 15 2010 22:06:22 +0000 Subject: Bug 604263 - Fix memory leak when password change is rejected If a password is changed using the password modify extended operation, the modify used to modify the password will be leaked if the change is rejected due to password policy or access control settings. This patch frees the mod when the password change is rejected. --- diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c index 955ef82..ead066d 100644 --- a/ldap/servers/slapd/modify.c +++ b/ldap/servers/slapd/modify.c @@ -529,6 +529,7 @@ static int modify_internal_pb (Slapi_PBlock *pb) if (pw_change == -1) { /* The internal result code will already have been set by op_shared_allow_pw_change() */ + ldap_mods_free(normalized_mods, 1); return 0; } }