mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Free resources when gss_accept_sec_context() fails
Even if a call to gss_accept_sec_context() fails, it might still cause a GSS-API response token to be allocated and left for the caller to release. Make sure the token is released before an early return from dst_gssapi_acceptctx().
This commit is contained in:
@@ -739,6 +739,9 @@ dst_gssapi_acceptctx(dns_gss_cred_id_t cred, const char *gssapi_keytab,
|
|||||||
default:
|
default:
|
||||||
gss_log(3, "failed gss_accept_sec_context: %s",
|
gss_log(3, "failed gss_accept_sec_context: %s",
|
||||||
gss_error_tostring(gret, minor, buf, sizeof(buf)));
|
gss_error_tostring(gret, minor, buf, sizeof(buf)));
|
||||||
|
if (gouttoken.length > 0U) {
|
||||||
|
(void)gss_release_buffer(&minor, &gouttoken);
|
||||||
|
}
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user