In case of an error, the program_list_and_notification_t pointer has not been
freed before calling pthread_exit() from exec_notification_one().
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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)
kill (pl->pid, SIGTERM);
pl->pid = 0;
close (fd);
+ sfree (arg);
pthread_exit ((void *) 1);
}