diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-03 00:46:23 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2005-12-03 00:46:23 +0000 |
commit | ba93a08ed65dae543b24993badd8ea953e63260e (patch) | |
tree | 3bc109003a22d11e24937d91ef0fef0bcb2a22e5 /source/kdc | |
parent | 7b77068344fb34e39a8457ae47c3956b005feff4 (diff) | |
download | samba-ba93a08ed65dae543b24993badd8ea953e63260e.tar.gz samba-ba93a08ed65dae543b24993badd8ea953e63260e.tar.xz samba-ba93a08ed65dae543b24993badd8ea953e63260e.zip |
r12036: Fix more KDC memory leaks (and there are probably still more...).
Andrew Bartlett
Diffstat (limited to 'source/kdc')
-rw-r--r-- | source/kdc/hdb-ldb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/kdc/hdb-ldb.c b/source/kdc/hdb-ldb.c index 8d9517e8278..e9c1855a100 100644 --- a/source/kdc/hdb-ldb.c +++ b/source/kdc/hdb-ldb.c @@ -706,10 +706,13 @@ static krb5_error_code LDB_fetch_ex(krb5_context context, HDB *db, unsigned flag &msg, &realm_ref_msg); free(principal_string); if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER)) { + talloc_free(mem_ctx); return HDB_ERR_NOENTRY; } else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_MEMORY)) { + talloc_free(mem_ctx); return ENOMEM; } else if (!NT_STATUS_IS_OK(nt_status)) { + talloc_free(mem_ctx); return EINVAL; } @@ -751,6 +754,7 @@ static krb5_error_code LDB_fetch_ex(krb5_context context, HDB *db, unsigned flag break; } else { /* we should lookup trusted domains */ + talloc_free(mem_ctx); return HDB_ERR_NOENTRY; } |