[systemd-devel] [systemd PATCH 1/2] Fix mismatching pipe close opened by popen()
Kok, Auke-jan H
auke-jan.h.kok at intel.com
Fri Jan 25 15:22:20 PST 2013
On Fri, Jan 25, 2013 at 8:50 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Fri, Jan 25, 2013 at 01:58:54PM +0100, Thomas Jarosch wrote:
>> cppcheck reported:
>> [src/bootchart/svg.c:791]: (error) Mismatching allocation and deallocation: f
>>
>> Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
>> ---
>> src/bootchart/svg.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
>> index 156918a..550f769 100644
>> --- a/src/bootchart/svg.c
>> +++ b/src/bootchart/svg.c
>> @@ -788,7 +788,7 @@ static void svg_do_initcall(int count_only)
>> kcount++;
>> }
>>
>> - fclose(f);
>> + pclose(f);
>> }
> Thanks for the report and patch. I commited a different fix, which
> uses __attribute__((cleanup(pclosep))).
Thanks!
Auke
More information about the systemd-devel
mailing list