1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

export_secret_ssh_key: Avoid memory leak.

* g10/export.c (export_secret_ssh_key): Free memory on errrors.

--

GnuPG-bug-id: 7201
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Jakub Jelen 2024-07-15 20:33:11 +02:00 committed by NIIBE Yutaka
parent b1029031d4
commit f66e9356f8
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -2978,7 +2978,7 @@ export_secret_ssh_key (ctrl_t ctrl, const char *userid)
{ {
log_error (_("key \"%s\" not found: %s\n"), userid, log_error (_("key \"%s\" not found: %s\n"), userid,
err? gpg_strerror (err) : "Not a Keygrip" ); err? gpg_strerror (err) : "Not a Keygrip" );
return err; goto leave;
} }
bin2hex (desc.u.grip, KEYGRIP_LEN, hexgrip); bin2hex (desc.u.grip, KEYGRIP_LEN, hexgrip);