mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-05 01:02:39 +03:00
gssapi: Release buffer on error path (GHSL-2023-035)
Thanks Phil Turnbull from GitHub Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
bdabf25a5b
commit
f691dbbaab
@@ -350,6 +350,7 @@ static char *ssh_gssapi_name_to_char(gss_name_t name)
|
||||
min_stat);
|
||||
ptr = malloc(buffer.length + 1);
|
||||
if (ptr == NULL) {
|
||||
gss_release_buffer(&min_stat, &buffer);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(ptr, buffer.value, buffer.length);
|
||||
|
||||
Reference in New Issue
Block a user