Avoid leaking memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18888 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -181,20 +181,6 @@ gsskrb5_get_creds(
|
|||||||
|
|
||||||
*cred = NULL;
|
*cred = NULL;
|
||||||
|
|
||||||
kret = krb5_cc_get_principal(_gsskrb5_context, ccache, &ctx->source);
|
|
||||||
if (kret) {
|
|
||||||
_gsskrb5_set_error_string ();
|
|
||||||
*minor_status = kret;
|
|
||||||
return GSS_S_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
kret = krb5_copy_principal(_gsskrb5_context, target_name, &ctx->target);
|
|
||||||
if (kret) {
|
|
||||||
_gsskrb5_set_error_string ();
|
|
||||||
*minor_status = kret;
|
|
||||||
return GSS_S_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&this_cred, 0, sizeof(this_cred));
|
memset(&this_cred, 0, sizeof(this_cred));
|
||||||
this_cred.client = ctx->source;
|
this_cred.client = ctx->source;
|
||||||
this_cred.server = ctx->target;
|
this_cred.server = ctx->target;
|
||||||
@@ -380,9 +366,7 @@ init_auth
|
|||||||
} else
|
} else
|
||||||
ccache = initiator_cred_handle->ccache;
|
ccache = initiator_cred_handle->ccache;
|
||||||
|
|
||||||
kret = krb5_cc_get_principal (_gsskrb5_context,
|
kret = krb5_cc_get_principal (_gsskrb5_context, ccache, &ctx->source);
|
||||||
ccache,
|
|
||||||
&ctx->source);
|
|
||||||
if (kret) {
|
if (kret) {
|
||||||
_gsskrb5_set_error_string ();
|
_gsskrb5_set_error_string ();
|
||||||
*minor_status = kret;
|
*minor_status = kret;
|
||||||
|
Reference in New Issue
Block a user