[CRIU] [PATCH 1/2] Get rid of xfree()

Pavel Emelyanov xemul at parallels.com
Tue Oct 20 00:24:00 PDT 2015


On 10/20/2015 03:27 AM, Kir Kolyshkin wrote:
> Contrary to a popular opinion, there is no need to check
> an argument for being non-NULL before calling free().
> 
>>From free(3) man page:
> 
>> If ptr is NULL, no operation is performed.
> 
> Let's remove xfree() macro and replace all calls to free().

I'd like to keep xfree()-s in the code. Partially to be
symmetrical to xmalloc-s, partially to make it possible 
to quickly spot the places where we free the memory.

-- Pavel



More information about the CRIU mailing list