2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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:
Michał Kępień
2021-04-08 10:33:44 +02:00
parent 3c5267cc5c
commit d954e152d9

View File

@@ -739,6 +739,9 @@ dst_gssapi_acceptctx(dns_gss_cred_id_t cred, const char *gssapi_keytab,
default:
gss_log(3, "failed gss_accept_sec_context: %s",
gss_error_tostring(gret, minor, buf, sizeof(buf)));
if (gouttoken.length > 0U) {
(void)gss_release_buffer(&minor, &gouttoken);
}
return (result);
}