summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb/ipa_kdb.c
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2013-02-12 11:59:22 +0100
committerMartin Kosek <mkosek@redhat.com>2013-02-14 10:09:48 +0100
commit93ea8a6ac311d7365b093b3449b281bbfa0911ab (patch)
treed35eb678374bbb6a58afc5b64878ad3ad11f6048 /daemons/ipa-kdb/ipa_kdb.c
parentb8079f9ed4ba9632c77fa973aa2247a4d30434fa (diff)
downloadfreeipa-93ea8a6ac311d7365b093b3449b281bbfa0911ab.tar.gz
freeipa-93ea8a6ac311d7365b093b3449b281bbfa0911ab.tar.xz
freeipa-93ea8a6ac311d7365b093b3449b281bbfa0911ab.zip
ipa-kdb: remove memory leaks
All known memory leaks caused by unfreed allocated memory or unfreed LDAP results (which should be also done after unsuccessful searches) are fixed. https://fedorahosted.org/freeipa/ticket/3413
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb.c')
-rw-r--r--daemons/ipa-kdb/ipa_kdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb.c b/daemons/ipa-kdb/ipa_kdb.c
index 3527cefa1..55a932abd 100644
--- a/daemons/ipa-kdb/ipa_kdb.c
+++ b/daemons/ipa-kdb/ipa_kdb.c
@@ -40,10 +40,14 @@ static void ipadb_context_free(krb5_context kcontext,
{
if (*ctx != NULL) {
free((*ctx)->uri);
+ free((*ctx)->base);
+ free((*ctx)->realm_base);
/* ldap free lcontext */
if ((*ctx)->lcontext) {
ldap_unbind_ext_s((*ctx)->lcontext, NULL, NULL);
}
+ free((*ctx)->supp_encs);
+ ipadb_mspac_struct_free(&(*ctx)->mspac);
krb5_free_default_realm(kcontext, (*ctx)->realm);
free(*ctx);
*ctx = NULL;