summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16720ff)
raw | patch | inline | side by side (parent: 16720ff)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 27 Jan 2008 22:26:41 +0000 (23:26 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 4 Feb 2008 16:45:11 +0000 (17:45 +0100) |
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>
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>
src/exec.c | patch | blob | history |
diff --git a/src/exec.c b/src/exec.c
index e7648bd7f3f66e7be405dd4042e8cf0d839b9b38..d5a8d0fd57562cd292f2156c42130da48f803dbe 100644 (file)
--- a/src/exec.c
+++ b/src/exec.c
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);
}