Code

collectd(1), README: Document notifications and related plugins.
[collectd.git] / src / exec.c
index e7648bd7f3f66e7be405dd4042e8cf0d839b9b38..d5a8d0fd57562cd292f2156c42130da48f803dbe 100644 (file)
@@ -581,8 +581,10 @@ static void *exec_notification_one (void *arg) /* {{{ */
   const char *severity;
 
   pid = fork_child (pl, &fd, NULL);
-  if (pid < 0)
+  if (pid < 0) {
+    sfree (arg);
     pthread_exit ((void *) 1);
+  }
 
   fh = fdopen (fd, "w");
   if (fh == NULL)
@@ -593,6 +595,7 @@ static void *exec_notification_one (void *arg) /* {{{ */
     kill (pl->pid, SIGTERM);
     pl->pid = 0;
     close (fd);
+    sfree (arg);
     pthread_exit ((void *) 1);
   }