1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <neal@g10code.com>.
Reported-by: Sami Farin.
GnuPG-bug-id: 2045
This commit is contained in:
Neal H. Walfield 2015-07-16 09:57:27 +02:00 committed by Neal H. Walfield
parent 022719695e
commit 376417ab63

View File

@ -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);