diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-03 00:46:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:01 -0500 |
commit | c85779b3b556c712f8fdcde6e2464bc2833054dd (patch) | |
tree | 45eb934634d1044c1e3794a96110fb3c34d37a6e /source4 | |
parent | 925c95ac9e491ba115bd7ebeb157614cd9bcbe59 (diff) | |
download | samba-c85779b3b556c712f8fdcde6e2464bc2833054dd.tar.gz samba-c85779b3b556c712f8fdcde6e2464bc2833054dd.tar.bz2 samba-c85779b3b556c712f8fdcde6e2464bc2833054dd.zip |
r12036: Fix more KDC memory leaks (and there are probably still more...).
Andrew Bartlett
(This used to be commit 0c4ea6f6413e260a15c0afe331a066ea7051fd9f)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/kdc/hdb-ldb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c index 8d9517e827..e9c1855a10 100644 --- a/source4/kdc/hdb-ldb.c +++ b/source4/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; } |