summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/ipa_pwd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ipa_pwd.c b/util/ipa_pwd.c
index c41617533..fda6cb34e 100644
--- a/util/ipa_pwd.c
+++ b/util/ipa_pwd.c
@@ -560,7 +560,7 @@ int ipapwd_generate_new_history(char *password,
unsigned char *hash = NULL;
unsigned int hash_len;
char *new_element;
- char **ordered;
+ char **ordered = NULL;
int c, i, n;
int len;
int ret;
@@ -626,9 +626,11 @@ int ipapwd_generate_new_history(char *password,
*new_pwd_history = ordered;
*new_pwd_hlen = n;
+ ordered = NULL;
ret = IPAPWD_POLICY_OK;
done:
+ free(ordered);
free(hash);
return ret;
}