[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: Re: [PATCH 02/10] os: fix memory leak in Popen
From: Tiago Vignatti <tiago.vignatti () nokia ! com>
Date: 2011-03-31 12:15:41
Message-ID: 4D94706D.7000200 () nokia ! com
[Download RAW message or body]
On 03/30/2011 02:10 AM, ext Nicolas PENINGUY wrote:
> On Tue, 2011-03-29 at 18:12 +0300, Tiago Vignatti wrote:
>> +++ 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;
>> }
>
> Shouldn't we close the two file descriptors returned by pipe() in this
> case ?
>
> close(pdes[0]);
> close(pdes[1]);
yes, we should. Thanks!
Tiago
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic