diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-03-28 19:21:28 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-04 15:41:47 +0300 |
commit | a6c71ce5d2d2fe89e07a2ef5041c915acc3dc686 (patch) | |
tree | b70416b34417fbed2f9d4f0901959f4ca67b71e7 | |
parent | bafec9a25efa902bef2a3730dc44dc50f0e45877 (diff) |
os: fix memory and fd leaks in Popen
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
-rw-r--r-- | os/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/utils.c b/os/utils.c index f47177f4f..36cb46f11 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1315,6 +1315,9 @@ Popen(char *command, char *type) /* Ignore the smart scheduler while this is going on */ old_alarm = OsSignal(SIGALRM, SIG_IGN); if (old_alarm == SIG_ERR) { + close(pdes[0]); + close(pdes[1]); + free(cur); perror("signal"); return NULL; } |