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

Fix gpg-agent secure memory leak in OpenPGP private key import.

2011-04-20  Marcus Brinkmann  <mb@g10code.com>

        * command.c (cmd_import_key): Release key from failed import
        before converting openpgp private key in the openpgp-private-key
        case.
This commit is contained in:
Marcus Brinkmann 2011-04-20 11:33:09 +02:00
parent b5f585f7d7
commit 70b871abbc
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-04-20 Marcus Brinkmann <mb@g10code.com>
* command.c (cmd_import_key): Release key from failed import
before converting openpgp private key in the openpgp-private-key
case.
2011-04-17 Ben Kibbey <bjk@luxsci.net>
* command.c (cmd_passwd): Check for an error before presetting.

View File

@ -1827,6 +1827,8 @@ cmd_import_key (assuan_context_t ctx, char *line)
used to protect the key using the same code as for regular
key import. */
xfree (key);
key = NULL;
err = convert_from_openpgp (ctrl, openpgp_sexp, grip,
ctrl->server_local->keydesc, cache_nonce,
&key, &passphrase);