summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-13 06:07:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:05 -0500
commit8cd7848b8fc7f31bfcac84a44ae39deb40cf2587 (patch)
tree3fd288fa7921d0ade78d10500c8033ae599e6ac4 /source4/kdc
parent816f4f7c4afa1022075fb36563fadf4820f37afd (diff)
downloadsamba-8cd7848b8fc7f31bfcac84a44ae39deb40cf2587.tar.gz
samba-8cd7848b8fc7f31bfcac84a44ae39deb40cf2587.tar.bz2
samba-8cd7848b8fc7f31bfcac84a44ae39deb40cf2587.zip
r7520: Fix memory leak in hdb-ldb.c
Andrew Bartlett (This used to be commit 7f6a7f7fc521f41c811c51fb692f408dc570f4cd)
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/hdb-ldb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 32fb603eef..c8078c5b1e 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -791,12 +791,15 @@ static krb5_error_code LDB_fetch(krb5_context context, HDB *db, unsigned flags,
krb5_set_error_string(context, "LDB_fetch: strdup() failed");
ret = ENOMEM;
talloc_free(mem_ctx);
+ free_Principal(&alias_principal);
return ret;
}
ret = LDB_lookup_principal(context, (struct ldb_context *)db->hdb_db,
mem_ctx,
&alias_principal, ent_type, realm_dn, &msg);
+ free_Principal(&alias_principal);
+
if (ret != 0) {
krb5_warnx(context, "LDB_fetch: could not find alias principal in DB");
krb5_set_error_string(context, "LDB_fetch: could not find alias principal in DB");