mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09: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>
(cherry picked from commit b90cc79cbe)
This commit is contained in:
@@ -833,6 +833,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