From 8cd7848b8fc7f31bfcac84a44ae39deb40cf2587 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 13 Jun 2005 06:07:18 +0000 Subject: r7520: Fix memory leak in hdb-ldb.c Andrew Bartlett (This used to be commit 7f6a7f7fc521f41c811c51fb692f408dc570f4cd) --- source4/kdc/hdb-ldb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/kdc') 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"); -- cgit