Don't segfault if the first 'auto-key-locate' option is 'clear'.
authorNeal H. Walfield <neal@g10code.com>
Thu, 16 Jul 2015 07:57:27 +0000 (09:57 +0200)
committerNeal H. Walfield <neal@g10code.com>
Thu, 16 Jul 2015 07:57:41 +0000 (09:57 +0200)
* g10/getkey.c (free_akl): If AKL is NULL, just return.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
Reported-by: Sami Farin.
GnuPG-bug-id: 2045

g10/getkey.c

index e450c56..5f118ea 100644 (file)
@@ -2923,6 +2923,9 @@ get_ctx_handle (GETKEY_CTX ctx)
 static void
 free_akl (struct akl *akl)
 {
+  if (! akl)
+    return;
+
   if (akl->spec)
     free_keyserver_spec (akl->spec);