Fix memory leak on exit
Only to clean up, possibly relevant for no-MMU systems, but they have other issues as well (e.g. fork) that prevent them from using the sysklogd project. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
7ff4a7d210
commit
dfc32d7843
@ -2372,6 +2372,11 @@ void die(int signo)
|
|||||||
flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo);
|
flog(LOG_SYSLOG | LOG_INFO, "exiting on signal %d", signo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Stop all active timers
|
||||||
|
*/
|
||||||
|
timer_exit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close all open log files.
|
* Close all open log files.
|
||||||
*/
|
*/
|
||||||
|
@ -212,7 +212,7 @@ void timer_exit(void)
|
|||||||
|
|
||||||
alarm(0);
|
alarm(0);
|
||||||
|
|
||||||
close(timer_fd[0]);
|
socket_close((timer_fd[0]));
|
||||||
close(timer_fd[1]);
|
close(timer_fd[1]);
|
||||||
|
|
||||||
LIST_FOREACH_SAFE(tmr, &tmr_head, tmr_link, tmp) {
|
LIST_FOREACH_SAFE(tmr, &tmr_head, tmr_link, tmp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user