1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-06 23:17:47 +02:00

g10: Fix memory leak.

* g10/keygen.c (keygen_set_std_prefs): Fix memory leak.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-07-01 11:26:54 +02:00
parent 6bfbc368f9
commit 5fafd18d47

View File

@ -413,9 +413,9 @@ keygen_set_std_prefs (const char *string,int personal)
if(strlen(string))
{
char *tok,*prefstring;
char *dup, *tok, *prefstring;
prefstring=xstrdup(string); /* need a writable string! */
dup = prefstring = xstrdup (string); /* need a writable string! */
while((tok=strsep(&prefstring," ,")))
{
@ -449,7 +449,7 @@ keygen_set_std_prefs (const char *string,int personal)
}
}
xfree(prefstring);
xfree (dup);
}
if(!rc)