qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] numa: fix qerror_report_err not free issue


From: Li Liu
Subject: Re: [Qemu-trivial] [PATCH] numa: fix qerror_report_err not free issue
Date: Sat, 30 Aug 2014 14:24:28 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0


On 2014/8/30 13:26, Michael Tokarev wrote:
> 30.08.2014 07:36, john.liuli wrote:
>> From: Li Liu <address@hidden>
>>
>> All qerror_report_err returned none NULL pointers need to
>> be freed, otherwise will cause memory leaking.
>>
>> Although this place did not cause real memory leaking by exit,
>> obviously it's not correct to use qerror_report_err
>> without error_free it.
> 
> I don't thing there's any good reason to free resources like
> this (freeing memory, closing files, etc) right before exit()
> (esp. in error path).  The OS will do that for us in one go
> much faster.
> 

Yes, the OS will do that for us. But if someone refer to this code
to use qerror_report_err, it will give a bad hint. Of cause this
patch is just a suggestion.

Best regards
Li.

> /mjt
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]