X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=cdcf6adebdba0f886aa2515cb92e7ac9b21a92d7;hb=4027126a75439c7d2b1d5572092fd291ef19ead6;hp=8add480e3e548c5e62dc0f37bf49ab6e6c45dd4a;hpb=b72d521340383b6418fa6a75faca3bc45f06b14a;p=collectd.git diff --git a/src/exec.c b/src/exec.c index 8add480e..cdcf6ade 100644 --- a/src/exec.c +++ b/src/exec.c @@ -712,7 +712,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); @@ -760,7 +761,8 @@ static int exec_read (void) /* {{{ */ return (0); } /* int exec_read }}} */ -static int exec_notification (const notification_t *n) +static int exec_notification (const notification_t *n, + user_data_t __attribute__((unused)) *user_data) { program_list_t *pl; program_list_and_notification_t *pln; @@ -800,7 +802,7 @@ static int exec_notification (const notification_t *n) } /* for (pl) */ return (0); -} /* int exec_notification */ +} /* }}} int exec_notification */ static int exec_shutdown (void) /* {{{ */ { @@ -833,7 +835,8 @@ void module_register (void) plugin_register_complex_config ("exec", exec_config); plugin_register_init ("exec", exec_init); plugin_register_read ("exec", exec_read); - plugin_register_notification ("exec", exec_notification); + plugin_register_notification ("exec", exec_notification, + /* user_data = */ NULL); plugin_register_shutdown ("exec", exec_shutdown); } /* void module_register */