1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

- Replaced all free() with wfree() where appropriate

- Fixed some memory leaks
This commit is contained in:
dan
2000-10-31 14:57:22 +00:00
parent 581ab58f70
commit 497e34b6b8
72 changed files with 545 additions and 539 deletions

View File

@@ -302,7 +302,7 @@ makeWindowState(WWindow *wwin, WApplication *wapp)
if (instance) XFree(instance);
if (class) XFree(class);
if (command) free(command);
if (command) wfree(command);
return win_state;
}
@@ -404,8 +404,8 @@ execCommand(WScreen *scr, char *command, char *host)
exit(111);
}
while (argc > 0)
free(argv[--argc]);
free(argv);
wfree(argv[--argc]);
wfree(argv);
return pid;
}
@@ -557,11 +557,11 @@ wSessionRestoreState(WScreen *scr)
} else if ((pid = execCommand(scr, command, host)) > 0) {
wWindowAddSavedState(instance, class, command, pid, state);
} else {
free(state);
wfree(state);
}
if (instance) free(instance);
if (class) free(class);
if (instance) wfree(instance);
if (class) wfree(class);
}
/* clean up */
PLSetStringCmpHook(StringCompareHook);
@@ -1150,17 +1150,17 @@ fail:
SmcSaveYourselfDone(smc_conn, ok);
if (prop[0].vals)
free(prop[0].vals);
wfree(prop[0].vals);
if (prop[1].vals)
free(prop[1].vals);
wfree(prop[1].vals);
if (discardCmd)
free(discardCmd);
wfree(discardCmd);
if (!ok) {
remove(statefile);
}
if (statefile)
free(statefile);
wfree(statefile);
}