[libvirt] [PATCH v2 2/2] Use virCheckFlags for APIs added in 0.8.0

Jiri Denemark jdenemar at redhat.com
Fri Apr 16 12:14:58 UTC 2010


> I scanned through the patch, and didn't see any instances where we are
> calling virCheckFlags after non-trivial work.  It is something to be
> aware of when using the macro in the future, since:
> 
> {
>     ptr *foo = somethingThatMallocs();
>     virCheckFlags(0, NULL);
> 
> would be a memory leak, masked because the return is hidden inside the
> virCheckFlags macro.

Yes. I added a note to macro documentation to make this issue more visible.

> ACK.

And pushed, thanks.

Jirka




More information about the libvir-list mailing list