diff options
| author | Simo Sorce <ssorce@redhat.com> | 2011-11-03 13:40:46 -0400 |
|---|---|---|
| committer | Simo Sorce <ssorce@redhat.com> | 2011-11-07 11:13:55 -0500 |
| commit | c8aec450bef6cd24589476f7747bf37bf0e636ea (patch) | |
| tree | 2b054395f4022f195f229834cec7f963f7611bea | |
| parent | c286278aa94091460a1f6ce243c16ba649f45363 (diff) | |
| download | freeipa.git-c8aec450bef6cd24589476f7747bf37bf0e636ea.tar.gz freeipa.git-c8aec450bef6cd24589476f7747bf37bf0e636ea.tar.xz freeipa.git-c8aec450bef6cd24589476f7747bf37bf0e636ea.zip | |
Fix CID 11021: Resource leak
https://fedorahosted.org/freeipa/ticket/2037
| -rw-r--r-- | util/ipa_pwd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ipa_pwd.c b/util/ipa_pwd.c index c4161753..fda6cb34 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; } |
