summaryrefslogtreecommitdiffstats
path: root/tools/gpgconf-comp.c
diff options
context:
space:
mode:
authorJoshua Rogers <git@internot.info>2014-12-22 14:47:50 +0100
committerWerner Koch <wk@gnupg.org>2014-12-22 16:20:55 +0100
commitcf88337f8a4f8c98aca4b1da5921d18567b4f474 (patch)
tree4fabfb53dcca59a74298e5fcadf147a62c361b1b /tools/gpgconf-comp.c
parentRegister DCO for Joshua Rogers. (diff)
downloadgnupg2-cf88337f8a4f8c98aca4b1da5921d18567b4f474.tar.xz
gnupg2-cf88337f8a4f8c98aca4b1da5921d18567b4f474.zip
tools: Free variable before return
* tools/gpgconf-comp.c: Free 'dest_filename' before it is returned upon error. -- Signed-off-by: Joshua Rogers <git@internot.info>
Diffstat (limited to 'tools/gpgconf-comp.c')
-rw-r--r--tools/gpgconf-comp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 8c47b2e5e..61faa1d14 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -2508,7 +2508,10 @@ change_options_file (gc_component_t component, gc_backend_t backend,
res = link (dest_filename, orig_filename);
#endif
if (res < 0 && errno != ENOENT)
- return -1;
+ {
+ xfree (dest_filename);
+ return -1;
+ }
if (res < 0)
{
xfree (orig_filename);