Fix small memory leak.

This commit is contained in:
Kris Maglione 2009-10-11 19:43:18 -04:00
parent 52feba5b07
commit b4d77c3719
1 changed files with 3 additions and 2 deletions

View File

@ -290,10 +290,11 @@ void
spawn_command(const char *cmd) {
char *shell, *p;
if((p = pathsearch(getenv("WMII_CONFPATH"), cmd, true)))
cmd = p;
if(doublefork() == 0) {
if((p = pathsearch(getenv("WMII_CONFPATH"), cmd, true)))
cmd = p;
if(setsid() == -1)
fatal("Can't setsid: %r");