mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
g10: Fix memory leak.
* g10/export.c (do_export_stream): Free secret parameters. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
eb4cdbefb0
commit
401db0eebb
@ -1557,6 +1557,15 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret,
|
||||
|
||||
xfree (pk->seckey_info);
|
||||
pk->seckey_info = NULL;
|
||||
{
|
||||
int i;
|
||||
for (i = pubkey_get_npkey (pk->pubkey_algo);
|
||||
i < pubkey_get_nskey (pk->pubkey_algo); i++)
|
||||
{
|
||||
gcry_mpi_release (pk->pkey[i]);
|
||||
pk->pkey[i] = NULL;
|
||||
}
|
||||
}
|
||||
xfree (hexgrip);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user