chiark
/
gitweb
/
~ian
/
gnupg2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2caee1f
)
tools: Fix memory leak.
author
Justus Winter
<justus@g10code.com>
Mon, 23 Jan 2017 10:52:30 +0000
(11:52 +0100)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Tue, 14 Feb 2017 00:29:34 +0000
(
00:29
+0000)
* tools/gpgconf-comp.c (change_options_file): Fix leak.
--
Previously, 'src_filename' and 'orig_filename' leaked if creating the
backup file failed.
Signed-off-by: Justus Winter <justus@g10code.com>
(cherry picked from commit
5b28f025085b386e0ec49535d4cd3f875a414eb0
)
Gbp-Pq: Name 0012-tools-Fix-memory-leak.patch
tools/gpgconf-comp.c
patch
|
blob
|
history
diff --git
a/tools/gpgconf-comp.c
b/tools/gpgconf-comp.c
index a25b5136ee39d83f01be5dadf4cab3315e856a3e..85eb80ab54387c64bac2d80a826a8845a4faa573 100644
(file)
--- a/
tools/gpgconf-comp.c
+++ b/
tools/gpgconf-comp.c
@@
-2641,6
+2641,8
@@
change_options_file (gc_component_t component, gc_backend_t backend,
if (res < 0 && errno != ENOENT)
{
xfree (dest_filename);
+ xfree (src_filename);
+ xfree (orig_filename);
return -1;
}
if (res < 0)