diff options
author | Justus Winter <[email protected]> | 2017-03-28 10:10:28 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-03-28 10:11:02 +0000 |
commit | 6d3edfd972c1114f43f6b35773dc25e0256f48f4 (patch) | |
tree | 7b290908e6c3641d607d778b55a1e7114f39a579 /g10/decrypt-data.c | |
parent | common: Fix connecting to the agent. (diff) | |
download | gnupg-6d3edfd972c1114f43f6b35773dc25e0256f48f4.tar.gz gnupg-6d3edfd972c1114f43f6b35773dc25e0256f48f4.zip |
g10: Fix memory leak.
* g10/decrypt-data.c (decrypt_data): Free 'filename'.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'g10/decrypt-data.c')
-rw-r--r-- | g10/decrypt-data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c index 11a253ff6..96e2487ec 100644 --- a/g10/decrypt-data.c +++ b/g10/decrypt-data.c @@ -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 ); |