X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=a0e534c7d5fdfa03950b97ed9b9b9809b5a9ec6d;hb=2d62935910e0bbb871705113aed6f19d9ae205f2;hp=7e1616774e4d3277961ee995b49c5f534cdcae57;hpb=164e3aed7d737055ac7aa2d0cc9981247f32a491;p=collectd.git diff --git a/src/exec.c b/src/exec.c index 7e161677..a0e534c7 100644 --- a/src/exec.c +++ b/src/exec.c @@ -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);