diff options
author | Simo Sorce <ssorce@redhat.com> | 2008-07-24 11:06:02 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2008-07-24 11:35:04 -0400 |
commit | 4d88900c223502323d557ff5de8a308206b1443e (patch) | |
tree | dfe6f7d7acfb4975688d9ea64630f7698bdce0ec | |
parent | 23fab304e97d4b275037e066ab93c44e0ed8ae96 (diff) | |
download | freeipa-4d88900c223502323d557ff5de8a308206b1443e.tar.gz freeipa-4d88900c223502323d557ff5de8a308206b1443e.tar.xz freeipa-4d88900c223502323d557ff5de8a308206b1443e.zip |
Fix a stupidty introduced recently in a fix to a segfault.
-rw-r--r-- | ipa-server/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ipa-server/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/ipa-server/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c index 027ec43c8..3b3b6b245 100644 --- a/ipa-server/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c +++ b/ipa-server/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c @@ -1270,19 +1270,21 @@ static int ipapwd_CheckPolicy(struct ipapwd_data *data) Slapi_Value *cpw[2] = {NULL, NULL}; Slapi_Value *pw; - cpw[0] = old_pw; + cpw[0] = slapi_value_new_string(old_pw); pw = slapi_value_new_string(data->password); if (!pw) { slapi_log_error(SLAPI_LOG_PLUGIN, "ipa_pwd_extop", "ipapwd_checkPassword: Out of Memory\n"); slapi_entry_free(policy); - slapi_value_free(&old_pw); + slapi_ch_free_string(&old_pw); + slapi_value_free(&cpw[0]); slapi_value_free(&pw); return LDAP_OPERATIONS_ERROR; } ret = slapi_pw_find_sv(cpw, pw); - slapi_value_free(&old_pw); + slapi_ch_free_string(&old_pw); + slapi_value_free(&cpw[0]); slapi_value_free(&pw); if (ret == 0) { |