diff options
-rw-r--r-- | include/ulogd/conffile.h | 3 | ||||
-rw-r--r-- | src/conffile.c | 4 | ||||
-rw-r--r-- | src/ulogd.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/ulogd/conffile.h b/include/ulogd/conffile.h index 826d9d5..7431243 100644 --- a/include/ulogd/conffile.h +++ b/include/ulogd/conffile.h @@ -67,4 +67,7 @@ int config_register_file(const char *file); /* parse the config file */ int config_parse_file(const char *section, struct config_keyset *kset); +/* release ressource allocated by config file handling */ +void config_stop(); + #endif /* ifndef _CONFFILE_H */ diff --git a/src/conffile.c b/src/conffile.c index 0c1a2a4..b27187e 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -222,3 +222,7 @@ cpf_error: return err; } +void config_stop() +{ + free(fname); +} diff --git a/src/ulogd.c b/src/ulogd.c index ae57a38..b079fd2 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -1013,6 +1013,8 @@ static void sigterm_handler(int signal) if (ulogd_logfile) free(ulogd_logfile); + config_stop(); + exit(0); } |