mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
pki: Fix memory leak of blob on error
CID #1419377 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -2293,6 +2293,7 @@ int ssh_pki_import_signature_blob(const ssh_string sig_blob,
|
|||||||
rc = ssh_buffer_unpack(buf, "bd", &flags, &counter);
|
rc = ssh_buffer_unpack(buf, "bd", &flags, &counter);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
SSH_BUFFER_FREE(buf);
|
SSH_BUFFER_FREE(buf);
|
||||||
|
SSH_STRING_FREE(blob);
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user