mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02: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);
|
xfree (pk->seckey_info);
|
||||||
pk->seckey_info = NULL;
|
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);
|
xfree (hexgrip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user