Close the logs and lockfile if error while forking.
Signed-off-by: Arturo Borrero Gonzalez <[email protected]>
---
src/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main.c b/src/main.c
index bab7772..3b19160 100644
--- a/src/main.c
+++ b/src/main.c
@@ -386,6 +386,8 @@ int main(int argc, char *argv[])
if ((pid = fork()) == -1) {
dlog(LOG_ERR, "fork has failed: %s", strerror(errno));
+ close_log();
+ unlink(CONFIG(lockfile));
exit(EXIT_FAILURE);
} else if (pid) {
sd_ct_mainpid(pid);
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html