[libvirt] [PATCH v2 1/21] hyperv: avoid query memleaks on failure

Eric Blake eblake at redhat.com
Thu Oct 23 23:13:20 UTC 2014


On 10/08/2014 10:29 AM, Eric Blake wrote:
> The function hypervEnumAndPull consumes query on success, but leaked
> it on failure.  Rather than having to change all callers (many of
> them indirect callers through the generated
> hypervGetMsvmComputerSystemList), it was easier to just guarantee
> that the buffer is cleaned on return from the function.
> 
> Reported by Yves Vinter.
> 
> * src/hyperv/hyperv_wmi.c (hypervEnumAndPull): Don't leak query on
> failure.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/hyperv/hyperv_wmi.c | 37 +++++++++++++++++++++----------------
>  1 file changed, 21 insertions(+), 16 deletions(-)

Yves gave me an off-list ACK for this patch, so I've pushed it.  With
this in place, it would be easier if you rebase your remaining patches
on top of this and repost them for review.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141023/7f7d9f6d/attachment-0001.sig>


More information about the libvir-list mailing list