diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-15 22:32:25 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-15 22:32:42 +0100 |
commit | 372d7ff8241888bc3895182b39497fa23381b7e7 (patch) | |
tree | ba9924ae6095404108adac691a60f082b175faf8 /src | |
parent | 2f3a3828accfc6fca0e6f35e1bf28bace7f5851a (diff) |
shutdown: free children from right place
Diffstat (limited to 'src')
-rw-r--r-- | src/child.c | 4 | ||||
-rw-r--r-- | src/child.h | 1 | ||||
-rw-r--r-- | src/main.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/child.c b/src/child.c index 9d59d20..3b1800f 100644 --- a/src/child.c +++ b/src/child.c @@ -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 diff --git a/src/child.h b/src/child.h index 70f52b7..efc6fe3 100644 --- a/src/child.h +++ b/src/child.h @@ -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); @@ -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) { |