Code

Merge branch 'collectd-4.5' into collectd-4.6
[collectd.git] / src / exec.c
index f5d2a6ddd0bcf7427f2b1c4df167f6755becab06..ea31b3022bea5d45f609276699faf37594379a91 100644 (file)
@@ -82,7 +82,7 @@ static pthread_mutex_t pl_lock = PTHREAD_MUTEX_INITIALIZER;
 /*
  * Functions
  */
-static void sigchld_handler (int signal) /* {{{ */
+static void sigchld_handler (int __attribute__((unused)) signal) /* {{{ */
 {
   pid_t pid;
   int status;
@@ -728,7 +728,8 @@ static void *exec_notification_one (void *arg) /* {{{ */
   DEBUG ("exec plugin: Child %i exited with status %i.",
       pid, status);
 
-  plugin_notification_meta_free (n);
+  plugin_notification_meta_free (n->meta);
+  n->meta = NULL;
   sfree (arg);
   pthread_exit ((void *) 0);
   return (NULL);