mirror of https://github.com/0intro/wmii
Fix small memory leak.
This commit is contained in:
parent
52feba5b07
commit
b4d77c3719
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue