agent: Fix resource leak

CID 1611718

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2025-06-26 10:10:49 +02:00
committed by Jakub Jelen
parent 8310b8cc2b
commit 5fc65e7270

View File

@@ -533,6 +533,7 @@ ssh_string ssh_agent_sign_data(ssh_session session,
* STRING_SIZE_MAX is (UINT32_MAX >> 8) + 1 */
rc = ssh_buffer_allocate_size(request, (uint32_t)request_len);
if (rc < 0) {
SSH_STRING_FREE(key_blob);
SSH_BUFFER_FREE(request);
return NULL;
}