supervise-daemon: Fix segfault when executable does not exist
When executable is provided just by name (and therefore searched in a path), exec_file is reset to NULL every time. exists() handles it being NULL just fine, but dereferencing it in eerror does not work. Fixes #326 Fixes #327
This commit is contained in:
parent
eb61085951
commit
6deda13754
@ -983,7 +983,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if (!exists(exec_file)) {
|
||||
eerror("%s: %s does not exist", applet,
|
||||
*exec_file ? exec_file : exec);
|
||||
exec_file ? exec_file : exec);
|
||||
free(exec_file);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user