shutdown: free children from right place

This commit is contained in:
rofl0r committed 2020-09-15 22:32:42 +01:00
1 parent 2f3a3828ac
commit 372d7ff824
3 files changed
+6

No files matched your search

+4
View File
@@ -245,6 +245,10 @@ void child_kill_children (int sig)
);
}
void child_free_children(void) {
sblist_free(childs);
childs = 0;
}
/**
* Listen on the various configured interfaces
+1
View File
@@ -36,6 +36,7 @@ extern int child_listening_sockets (vector_t listen_addrs, uint16_t port);
extern void child_close_sock (void);
extern void child_main_loop (void);
extern void child_kill_children (int sig);
extern void child_free_children(void);
extern short int child_configure (child_config_t type, unsigned int val);
+1
View File
@@ -401,6 +401,7 @@ main (int argc, char **argv)
child_kill_children (SIGTERM);
child_close_sock ();
child_free_children();
/* Remove the PID file */
if (config->pidpath != NULL && unlink (config->pidpath) < 0) {