summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-01-12 14:17:30 +0100
committerSimo Sorce <ssorce@redhat.com>2011-01-14 14:20:57 -0500
commit7b5601eeb52f0eab55c5b5577f90b2ecc7f26dd9 (patch)
tree646aeee8e3a1a000046844a52126d9c4144aefd8 /ipa-client
parent063c6efd42ac774c835e1b42ae51d7cc8edb4835 (diff)
downloadfreeipa-7b5601eeb52f0eab55c5b5577f90b2ecc7f26dd9.tar.gz
freeipa-7b5601eeb52f0eab55c5b5577f90b2ecc7f26dd9.tar.xz
freeipa-7b5601eeb52f0eab55c5b5577f90b2ecc7f26dd9.zip
Potential memory leaks in ipa-getkeytab
This patch fixes 2 situations where a pointer to allocated error string could be overwritten - which could have resulted in a memory leak. https://fedorahosted.org/freeipa/ticket/714
Diffstat (limited to 'ipa-client')
-rw-r--r--ipa-client/ipa-getkeytab.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipa-client/ipa-getkeytab.c b/ipa-client/ipa-getkeytab.c
index e4c7b0e2b..ec923096d 100644
--- a/ipa-client/ipa-getkeytab.c
+++ b/ipa-client/ipa-getkeytab.c
@@ -245,6 +245,7 @@ static int prep_ksdata(krb5_context krbctx, const char *str,
&similar);
if (krberr) {
free_keys_contents(krbctx, keys);
+ free(ksdata);
fprintf(stderr, _("Enctype comparison failed!\n"));
return 0;
}
@@ -707,6 +708,7 @@ static int ldap_set_keytab(krb5_context krbctx,
ldap_controls_free(srvctrl);
ldap_msgfree(res);
ldap_unbind_ext(ld, NULL, NULL);
+ free(encs);
return kvno;
error_out: