mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
pki_crypto: Fix memory leak
Fixed memory leak in pki_publickey_to_blob when using an EC type of hostkey. Signed-off-by: roytak <xjanot04@stud.fit.vutbr.cz> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -1499,6 +1499,8 @@ ssh_string pki_publickey_to_blob(const ssh_key key)
|
||||
|
||||
#endif /* OPENSSL_VERSION_NUMBER */
|
||||
e = pki_key_make_ecpoint_string(group, point);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
if (e == NULL) {
|
||||
SSH_BUFFER_FREE(buffer);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user