X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=1f8a9ac0ebfb4a7ccfb933192368630c63cd3844;hb=7f71f1b7a38d7b50af44f403b79aa034b3882f2a;hp=d2b2508db209b87fb302ec35dee558016e01cabb;hpb=fe9ba13c8866ada19f7a347f3757d4c740613cdb;p=collectd.git diff --git a/src/exec.c b/src/exec.c index d2b2508d..1f8a9ac0 100644 --- a/src/exec.c +++ b/src/exec.c @@ -23,6 +23,8 @@ * Peter Holik **/ +#define _BSD_SOURCE /* For setgroups */ + #include "collectd.h" #include "common.h" #include "plugin.h" @@ -728,7 +730,8 @@ static void *exec_notification_one (void *arg) /* {{{ */ DEBUG ("exec plugin: Child %i exited with status %i.", pid, status); - plugin_notification_meta_free (n->meta); + if (n->meta != NULL) + plugin_notification_meta_free (n->meta); n->meta = NULL; sfree (arg); pthread_exit ((void *) 0);