mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
gpg: Fix memory leak in parse_auto_key_locate.
* g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS. -- It was probably too late for me to hack. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0767eada14
commit
b70e86fd10
@ -4232,8 +4232,9 @@ int
|
||||
parse_auto_key_locate (const char *options_arg)
|
||||
{
|
||||
char *tok;
|
||||
char *options = xstrdup (options_arg);
|
||||
char *options, *options_buf;
|
||||
|
||||
options = options_buf = xstrdup (options_arg);
|
||||
while ((tok = optsep (&options)))
|
||||
{
|
||||
struct akl *akl, *check, *last = NULL;
|
||||
@ -4272,7 +4273,7 @@ parse_auto_key_locate (const char *options_arg)
|
||||
else
|
||||
{
|
||||
free_akl (akl);
|
||||
xfree (options);
|
||||
xfree (options_buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4301,7 +4302,7 @@ parse_auto_key_locate (const char *options_arg)
|
||||
}
|
||||
}
|
||||
|
||||
xfree (options);
|
||||
xfree (options_buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user