summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0eedd8)
raw | patch | inline | side by side (parent: e0eedd8)
author | Florian Forster <octo@collectd.org> | |
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200) |
src/collectdmon.c | patch | blob | history |
diff --git a/src/collectdmon.c b/src/collectdmon.c
index 078b2eb1d2b1422acc50370406ebf48558677a18..c81ca3f4fdcb08c7180af7dfe43c47f81e487650 100644 (file)
--- a/src/collectdmon.c
+++ b/src/collectdmon.c
openlog ("collectdmon", LOG_CONS | LOG_PID, LOG_DAEMON);
if (-1 == daemonize ())
+ {
+ free (collectd_argv);
return 1;
+ }
sa.sa_handler = sig_int_term_handler;
sa.sa_flags = 0;
if (0 != sigaction (SIGINT, &sa, NULL)) {
syslog (LOG_ERR, "Error: sigaction() failed: %s", strerror (errno));
+ free (collectd_argv);
return 1;
}
if (0 != sigaction (SIGTERM, &sa, NULL)) {
syslog (LOG_ERR, "Error: sigaction() failed: %s", strerror (errno));
+ free (collectd_argv);
return 1;
}
if (0 != sigaction (SIGHUP, &sa, NULL)) {
syslog (LOG_ERR, "Error: sigaction() failed: %s", strerror (errno));
+ free (collectd_argv);
return 1;
}