1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtinfogen_worker: don't free variables then use them later.

In several places, variables were XFree()'d, but then used in system()
commands later.  This would cause various issues - on my system, I'd
get:

sh: 1: Syntax error: EOF in backquote substitution
system for rm failed; exiting...

while building the guides.
This commit is contained in:
Jon Trulson 2013-08-31 17:18:53 -06:00
parent 219474c9c8
commit c6f1d5ac05

View file

@ -1498,11 +1498,10 @@ buildBookcase(char *cmdSrc, char *dirName)
style_file, bookCaseName, bookCaseName);
runShellCmd(cmd);
XtFree((char*)style_file);
snprintf(cmd, sizeof(cmd), "rm -f %s", style_file);
ret1 = system(cmd);
if(ret1 != 0) die(-1, "system for rm failed; exiting...\n");
XtFree((char*)style_file);
}
@ -1519,11 +1518,10 @@ buildBookcase(char *cmdSrc, char *dirName)
compress_file, bookCaseName, bookCaseName);
runShellCmd(cmd);
XtFree((char*)compress_file);
snprintf(cmd, sizeof(cmd), "rm -f %s", compress_file);
ret1 = system(cmd);
if(ret1 != 0) die(-1, "system for rm failed; exiting...\n");
XtFree((char*)compress_file);
}
@ -1540,11 +1538,10 @@ buildBookcase(char *cmdSrc, char *dirName)
runShellCmd(cmd);
XtFree((char*)anonym_file);
snprintf(cmd, sizeof(cmd), "rm -f %s", anonym_file);
ret1 = system(cmd);
if(ret1 != 0) die(-1, "system for rm failed; exiting...\n");
XtFree((char*)anonym_file);
}
validateBookCase(bookCaseMap, bookCaseName);
@ -1656,11 +1653,10 @@ storeBookCase(char *cmdSrc, char *tocOpt, char *dbName,
nsgmls_file, tocOpt, dbName, dirName, tmpFile);
runShellCmd(cmd);
XtFree((char*)nsgmls_file);
cmd = buildPath("rm -f %s", nsgmls_file);
ret = system(cmd);
if(ret != 0) die(-1, "system for rm failed; exiting...\n");
XtFree((char*)nsgmls_file);
}
XtFree(cmd);