tools: Fix memleak in gpgconf.
authorWerner Koch <wk@gnupg.org>
Thu, 8 Dec 2016 12:02:37 +0000 (13:02 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 8 Dec 2016 12:08:02 +0000 (13:08 +0100)
* tools/gpgconf.c (main): Free SOCKETDIR.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/gpgconf.c

index 67a0dce..5f7912a 100644 (file)
@@ -691,6 +691,7 @@ main (int argc, char **argv)
             if (gnupg_mkdir (socketdir, "-rwx"))
               gc_error (1, errno, "error creating '%s'", socketdir);
             /* Try again.  */
+            xfree (socketdir);
             socketdir = _gnupg_socketdir_internal (1, &flags);
           }