X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fexec.c;h=a0e534c7d5fdfa03950b97ed9b9b9809b5a9ec6d;hb=2d62935910e0bbb871705113aed6f19d9ae205f2;hp=26b8fa7ef4ae929fce16af725d91d030fd44c529;hpb=126d448bce2ab48300c05f13ee7eb0a75b214d81;p=collectd.git diff --git a/src/exec.c b/src/exec.c index 26b8fa7e..a0e534c7 100644 --- a/src/exec.c +++ b/src/exec.c @@ -28,11 +28,11 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" -#include "utils_cmd_putnotif.h" -#include "utils_cmd_putval.h" +#include "utils/cmds/putnotif.h" +#include "utils/cmds/putval.h" #include #include @@ -754,8 +754,9 @@ static void *exec_notification_one(void *arg) /* {{{ */ else if (n->severity == NOTIF_OKAY) severity = "OKAY"; - fprintf(fh, "Severity: %s\n" - "Time: %.3f\n", + fprintf(fh, + "Severity: %s\n" + "Time: %.3f\n", severity, CDTIME_T_TO_DOUBLE(n->time)); /* Print the optional fields */ @@ -918,6 +919,11 @@ static int exec_shutdown(void) /* {{{ */ INFO("exec plugin: Sent SIGTERM to %hu", (unsigned short int)pl->pid); } + for (int i = 0; pl->argv[i] != NULL; i++) { + sfree(pl->argv[i]); + } + sfree(pl->argv); + sfree(pl->exec); sfree(pl->user); sfree(pl);