Fix segfault on signal
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
94b3b79c56
commit
01e774c619
10
daemon.c
10
daemon.c
@ -159,11 +159,11 @@ static void parseControl(char *command) {
|
||||
} else if (!strcmp(action, "drop")) {
|
||||
drop = true;
|
||||
} else {
|
||||
for (int i = 1; i < NSIG; ++i) {
|
||||
char* signal[i];
|
||||
if (strcasecmp(action, signal[i])) continue;
|
||||
break;
|
||||
}
|
||||
for (int i = 1; i < NSIG; ++i) {
|
||||
if (strcasecmp(action, sigabbrev_np(i))) continue;
|
||||
signal = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!drop && !fn && !signal) {
|
||||
syslog(LOG_NOTICE, "unknown action or signal %s", action);
|
||||
|
Loading…
Reference in New Issue
Block a user