Re: [PATCH] lxcFreezeContainer: avoid test-after-deref of never-NULL pointer

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

 



On 05/17/2010 02:51 PM, Jim Meyering wrote:
>>>> Is this something that the useless-if-before-free test could have
>>>> caught, rather than waiting for coverity?
>>>
>>> Very good idea.
>>> Here's a patch to do that.
> Here's a complete patch:
> 
>>From 59d7134bc925de86b807262896a76256b889c96a Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@xxxxxxxxxx>
> Date: Mon, 17 May 2010 22:38:59 +0200
> Subject: [PATCH] maint: add more free-like functions to the list and deal with fallout
> 
> * cfg.mk (useless_free_options): Add many vir*Free* function names,
> and then remove the useless if-before-free tests exposed by running
> make syntax-check.

Looks sane.

> +useless_free_options =				\
> +  --name=VIR_FREE				\
...

> 
> +# The following template was generated by this command:
> +# make ID && aid free|grep '^vi'|sed 's/ .*//;s/^/#   /'
> +# N virBufferFreeAndReset
> +# y virCPUDefFree

Especially nice, along with the documentation of potential future
cleanup projects.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]