mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01: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:
parent
6bfbc368f9
commit
5fafd18d47
@ -413,9 +413,9 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||||||
|
|
||||||
if(strlen(string))
|
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," ,")))
|
while((tok=strsep(&prefstring," ,")))
|
||||||
{
|
{
|
||||||
@ -449,7 +449,7 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xfree(prefstring);
|
xfree (dup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!rc)
|
if(!rc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user