summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-10-15 23:14:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:04 -0500
commit59b66744f7318d8197f0d2029bf3b641dafa327e (patch)
tree03d44cfb4bc655088a411552743531246e06974b /source4/kdc
parenta719444f68c7448f53ce61dc9f02e552a98fedcf (diff)
downloadsamba-59b66744f7318d8197f0d2029bf3b641dafa327e.tar.gz
samba-59b66744f7318d8197f0d2029bf3b641dafa327e.tar.bz2
samba-59b66744f7318d8197f0d2029bf3b641dafa327e.zip
r19299: Fix possible memleaks
(This used to be commit 6fad80bb09113a60689061a2de67711c9924708b)
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/hdb-ldb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 551b0cc0f2..827c66b86d 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -458,8 +458,6 @@ static krb5_error_code LDB_lookup_principal(krb5_context context, struct ldb_con
char *short_princ;
char *short_princ_talloc;
- char *realm_dn_str;
-
struct ldb_result *res = NULL;
ret = krb5_unparse_name_norealm(context, principal, &short_princ);
@@ -501,13 +499,12 @@ static krb5_error_code LDB_lookup_principal(krb5_context context, struct ldb_con
lret = ldb_search(ldb_ctx, realm_dn, LDB_SCOPE_SUBTREE, filter, princ_attrs, &res);
- realm_dn_str = ldb_dn_linearize(mem_ctx, realm_dn);
-
if (lret != LDB_SUCCESS) {
DEBUG(3, ("Failed to search for %s: %s\n", filter, ldb_errstring(ldb_ctx)));
return HDB_ERR_NOENTRY;
} else if (res->count == 0 || res->count > 1) {
DEBUG(3, ("Failed find a single entry for %s: got %d\n", filter, res->count));
+ talloc_free(res);
return HDB_ERR_NOENTRY;
}
talloc_steal(mem_ctx, res->msgs);