From f2ee673c99825d5189631031ddec2dbf54dbd482 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Thu, 16 Jul 2015 09:57:27 +0200 Subject: [PATCH] Don't segfault if the first 'auto-key-locate' option is 'clear'. * g10/getkey.c (free_akl): If AKL is NULL, just return. -- Signed-off-by: Neal H. Walfield . Reported-by: Sami Farin. GnuPG-bug-id: 2045 --- g10/getkey.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/g10/getkey.c b/g10/getkey.c index e450c5655..5f118ea7d 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -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);