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 14:33:17 -0700
commita30af93befdf2e27b711484a74ba02079be93792 (patch)
treee3313895d97c94d959f557836622cb4110c96044
parent6b4c18fa09fc4dec58043082e21d6dd7e4340955 (diff)
downloadds-a30af93befdf2e27b711484a74ba02079be93792.tar.gz
ds-a30af93befdf2e27b711484a74ba02079be93792.tar.xz
ds-a30af93befdf2e27b711484a74ba02079be93792.zip
Bug 604263 - Fix memory leak when password change is rejected389-ds-base-1.2.6.rc2
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;
}
}