1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02: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

@ -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);