1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.

Jeremy.
(This used to be commit b2ba4d5c1b)
This commit is contained in:
Jeremy Allison 2004-05-06 18:23:01 +00:00 committed by Gerald (Jerry) Carter
parent 309bbba38b
commit 33ebb4bee5

View File

@ -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;
}