mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
g10: Fix memory leak.
* g10/decrypt-data.c (decrypt_data): Free 'filename'. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
caf0091553
commit
6d3edfd972
@ -222,7 +222,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
|||||||
|
|
||||||
if (opt.unwrap_encryption)
|
if (opt.unwrap_encryption)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename = NULL;
|
||||||
estream_t fp;
|
estream_t fp;
|
||||||
rc = get_output_file ("", 0, ed->buf, &filename, &fp);
|
rc = get_output_file ("", 0, ed->buf, &filename, &fp);
|
||||||
if (! rc)
|
if (! rc)
|
||||||
@ -248,6 +248,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
|||||||
if (afx)
|
if (afx)
|
||||||
release_armor_context (afx);
|
release_armor_context (afx);
|
||||||
}
|
}
|
||||||
|
xfree (filename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
proc_packets (ctrl, procctx, ed->buf );
|
proc_packets (ctrl, procctx, ed->buf );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user