gss: Fix NULL minor_status arguments

This commit is contained in:
Alexey Shapovalov
2022-12-14 12:06:56 +00:00
committed by Roland C. Dowdeswell
parent cdd22b6061
commit 20d4e914e3
5 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -926,7 +926,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_acquire_cred_from
NULL, time_rec, NULL, actual_mechs);
if (ret != GSS_S_COMPLETE) {
if (handle->mechanisms != NULL)
gss_release_oid_set(NULL, &handle->mechanisms);
gss_release_oid_set(minor_status, &handle->mechanisms);
HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);
krb5_free_principal(context, handle->principal);
free(handle);
+2 -1
View File
@@ -238,6 +238,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_add_cred_from (
failure:
if (handle) {
OM_uint32 tmp_status;
if (handle->principal)
krb5_free_principal(context, handle->principal);
if (handle->keytab)
@@ -245,7 +246,7 @@ failure:
if (handle->ccache)
krb5_cc_destroy(context, handle->ccache);
if (handle->mechanisms)
gss_release_oid_set(NULL, &handle->mechanisms);
gss_release_oid_set(&tmp_status, &handle->mechanisms);
free(handle);
}
if (cred && output_cred_handle)
+4 -3
View File
@@ -100,11 +100,12 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_context (
return GSS_S_COMPLETE;
failed:
{ OM_uint32 tmp_status;
if (src_name)
_gsskrb5_release_name(NULL, src_name);
_gsskrb5_release_name(&tmp_status, src_name);
if (targ_name)
_gsskrb5_release_name(NULL, targ_name);
_gsskrb5_release_name(&tmp_status, targ_name);
}
HEIMDAL_MUTEX_unlock(&ctx->ctx_id_mutex);
return ret;
}
+2 -1
View File
@@ -40,6 +40,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_mechs_for_name (
)
{
OM_uint32 ret;
OM_uint32 tmp_status;
ret = gss_create_empty_oid_set(minor_status, mech_types);
if (ret)
@@ -49,7 +50,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_mechs_for_name (
GSS_KRB5_MECHANISM,
mech_types);
if (ret)
gss_release_oid_set(NULL, mech_types);
gss_release_oid_set(&tmp_status, mech_types);
return ret;
}
+2 -1
View File
@@ -48,6 +48,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_names_for_mech (
)
{
OM_uint32 ret;
OM_uint32 tmp_status;
int i;
*minor_status = 0;
@@ -71,7 +72,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_names_for_mech (
}
if (ret != GSS_S_COMPLETE)
gss_release_oid_set(NULL, name_types);
gss_release_oid_set(&tmp_status, name_types);
return GSS_S_COMPLETE;
}