mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
pki: Fix memory leak on error path
Thanks coverity CID 1445481 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -834,6 +834,7 @@ ssh_string pki_private_key_to_pem(const ssh_key key,
|
||||
|
||||
rc = ssh_string_fill(blob, buf->data, buf->length);
|
||||
if (rc < 0) {
|
||||
ssh_string_free(blob);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user