summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-06-15 14:33:17 -0700
committerNathan Kinder <nkinder@redhat.com>2010-06-15 15:06:22 -0700
commit062c1a89d4438bf9e89d6e999b766a2387a28db6 (patch)
tree9a51b432096278527776bd4b1870cf2b158a6cb1
parent57482bba5cd55d0a52cd565777f2ee08a9f46cc5 (diff)
downloadds-062c1a89d4438bf9e89d6e999b766a2387a28db6.tar.gz
ds-062c1a89d4438bf9e89d6e999b766a2387a28db6.tar.xz
ds-062c1a89d4438bf9e89d6e999b766a2387a28db6.zip
Bug 604263 - Fix memory leak when password change is rejectedDirectory_Server_8_2_Candidate_20100616
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.
-rw-r--r--ldap/servers/slapd/modify.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 955ef820..ead066d1 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;
}
}