[PATCH 02/10] os: fix memory leak in Popen

Tiago Vignatti tiago.vignatti at nokia.com
Tue Mar 29 08:12:28 PDT 2011


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 os/utils.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/os/utils.c b/os/utils.c
index f47177f..74fe841 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1315,6 +1315,7 @@ 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) {
+      free(cur);
       perror("signal");
       return NULL;
     }
-- 
1.7.0.4



More information about the xorg-devel mailing list