]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hyperv: avoid query memleaks on failure
authorEric Blake <eblake@redhat.com>
Wed, 8 Oct 2014 16:23:59 +0000 (10:23 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 23 Oct 2014 23:11:56 +0000 (17:11 -0600)
commit0be3403db69fadeaae5d11ec43b909e4aee74a65
treea6fb7442fc99c510fd0b7be1be1f6b3537294b27
parentd21d35e33582aa2f085c8e116b36e283d77f230b
hyperv: avoid query memleaks on failure

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.

* src/hyperv/hyperv_wmi.c (hypervEnumAndPull): Don't leak query on
failure.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/hyperv/hyperv_wmi.c