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

Kir Kolyshkin kir at openvz.org
Tue Oct 20 11:38:55 PDT 2015



On 10/20/2015 12:24 AM, Pavel Emelyanov wrote:
> 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.

Attached is an alternative patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xfree-simplify.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20151020/3814e258/attachment.bin>


More information about the CRIU mailing list