mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
dtcreate: Fix double free inside ProcessExecString()
This commit is contained in:
parent
562da5af1b
commit
b17e52a269
1 changed files with 3 additions and 3 deletions
|
@ -851,7 +851,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE;
|
|||
covers the complete string
|
||||
between %'s
|
||||
*/
|
||||
if(argbuf) free(argbuf);
|
||||
if(argbuf) { free(argbuf); argbuf = NULL; }
|
||||
if(s2)
|
||||
{
|
||||
argbuf = (char *)calloc(1,(s2-s1)+2);
|
||||
|
@ -877,7 +877,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE;
|
|||
else if (s1 && *s1)
|
||||
{
|
||||
strcat(exec_args[0],s1);
|
||||
if(argbuf) free(argbuf);
|
||||
if(argbuf) { free(argbuf); argbuf = NULL; }
|
||||
done = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
@ -934,7 +934,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE;
|
|||
argfound = FALSE;
|
||||
s1=s2;
|
||||
}
|
||||
if(argbuf) free(argbuf);
|
||||
if(argbuf) { free(argbuf); argbuf = NULL; }
|
||||
return exec_args;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue