mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01: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)
|
||||
{
|
||||
char *filename;
|
||||
char *filename = NULL;
|
||||
estream_t fp;
|
||||
rc = get_output_file ("", 0, ed->buf, &filename, &fp);
|
||||
if (! rc)
|
||||
@ -248,6 +248,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
||||
if (afx)
|
||||
release_armor_context (afx);
|
||||
}
|
||||
xfree (filename);
|
||||
}
|
||||
else
|
||||
proc_packets (ctrl, procctx, ed->buf );
|
||||
|
Loading…
x
Reference in New Issue
Block a user