mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +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 */
|
#endif /* OPENSSL_VERSION_NUMBER */
|
||||||
e = pki_key_make_ecpoint_string(group, point);
|
e = pki_key_make_ecpoint_string(group, point);
|
||||||
|
EC_GROUP_free(group);
|
||||||
|
EC_POINT_free(point);
|
||||||
if (e == NULL) {
|
if (e == NULL) {
|
||||||
SSH_BUFFER_FREE(buffer);
|
SSH_BUFFER_FREE(buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user