diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-07-09 13:33:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:55 -0500 |
commit | 82e59d11c363bc0b85e4f1f6c1612cbaf1fb0300 (patch) | |
tree | 2c42ccb92fff4f08ee708012aa8db00a2b7ef2f6 /source4/libcli/auth | |
parent | f929ee3e4eefe370c9cb4672ea4754fc17f5917d (diff) | |
download | samba-82e59d11c363bc0b85e4f1f6c1612cbaf1fb0300.tar.gz samba-82e59d11c363bc0b85e4f1f6c1612cbaf1fb0300.tar.bz2 samba-82e59d11c363bc0b85e4f1f6c1612cbaf1fb0300.zip |
r1423: Make sure to destory the mem_ctx.
Andrew Bartlett
(This used to be commit c5a1529d54e6b8ec2bbf7017a2f48d7535f1f016)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r-- | source4/libcli/auth/clikrb5.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c index b3aa9008ca..2c036cfcf8 100644 --- a/source4/libcli/auth/clikrb5.c +++ b/source4/libcli/auth/clikrb5.c @@ -300,7 +300,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context, krb5_data in_data; BOOL creds_ready = False; - TALLOC_CTX *mem_ctx; + TALLOC_CTX *mem_ctx = NULL; retval = krb5_parse_name(context, principal, &server); if (retval) { @@ -352,7 +352,6 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context, http_timestring(mem_ctx, (unsigned)credsp->times.endtime), (unsigned)credsp->times.endtime)); - in_data.length = 0; retval = krb5_mk_req_extended(context, auth_context, ap_req_options, &in_data, credsp, outbuf); @@ -369,6 +368,9 @@ cleanup_creds: cleanup_princ: krb5_free_principal(context, server); + if (mem_ctx) { + talloc_destory(mem_ctx); + } return retval; } |