diff options
author | Jeremy Allison <jra@samba.org> | 2004-05-06 18:23:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:27 -0500 |
commit | 33ebb4bee57603288c37aa7f02a923b3d2804382 (patch) | |
tree | 82c3dbce780d86d0929fe1223ec4d726bf8bb26f | |
parent | 309bbba38b82013f0a4e7e638d6ff3235f9966aa (diff) | |
download | samba-33ebb4bee57603288c37aa7f02a923b3d2804382.tar.gz samba-33ebb4bee57603288c37aa7f02a923b3d2804382.tar.bz2 samba-33ebb4bee57603288c37aa7f02a923b3d2804382.zip |
r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit b2ba4d5c1be6089e3818a20c68e3894432b53d87)
-rw-r--r-- | source3/libsmb/clikrb5.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 81797a7bfc..e688ad608c 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -359,8 +359,8 @@ int cli_krb5_get_ticket(const char *principal, time_t time_offset, { krb5_error_code retval; krb5_data packet; - krb5_ccache ccdef; krb5_context context; + krb5_ccache ccdef = NULL; krb5_auth_context auth_context = NULL; krb5_enctype enc_types[] = { #ifdef ENCTYPE_ARCFOUR_HMAC @@ -411,8 +411,14 @@ int cli_krb5_get_ticket(const char *principal, time_t time_offset, #endif failed: - if ( context ) + + if ( context ) { + if (ccdef) + krb5_cc_close(context, ccdef); + if (auth_context) + krb5_auth_con_free(context, auth_context); krb5_free_context(context); + } return retval; } |