Package: gnupg2 / 2.0.26-6+deb8u2

0040-tools-Free-variable-before-return.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 1298b14f97efebdd88a9390af3848154dbe0d259 Mon Sep 17 00:00:00 2001
From: Joshua Rogers <git@internot.info>
Date: Tue, 23 Dec 2014 00:47:50 +1100
Subject: [PATCH 40/56] 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>
---
 tools/gpgconf-comp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index c43e87a..83bc24e 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -2390,7 +2390,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);
-- 
2.1.4