aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-07-16 07:57:27 +0000
committerNeal H. Walfield <[email protected]>2015-07-16 09:36:31 +0000
commit376417ab63ebb0fd2432ddc0ee1db722ffa1d3d2 (patch)
tree17cd1b5f2b0030f18a0e1983695bd9c6b320c4a7
parentscd: pinpad workaround for PC/SC implementations. (diff)
downloadgnupg-376417ab63ebb0fd2432ddc0ee1db722ffa1d3d2.tar.gz
gnupg-376417ab63ebb0fd2432ddc0ee1db722ffa1d3d2.zip
Don't segfault if the first 'auto-key-locate' option is 'clear'.
* g10/getkey.c (free_akl): If AKL is NULL, just return. -- Backported from f2ee673c99825d5189631031ddec2dbf54dbd482. Note: unlike in 2.1, in 2.0 this bug is not (currently) triggered since parse_auto_key_locate doesn't recognize "clear". Signed-off-by: Neal H. Walfield <[email protected]>. Reported-by: Sami Farin. GnuPG-bug-id: 2045
-rw-r--r--g10/getkey.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index a27c8e28a..6c14683d4 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3098,6 +3098,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);