[libvirt] [PATCH] vbox: avoid provoking assertions in VBoxSVC
Eric Blake
eblake at redhat.com
Tue Apr 17 16:50:42 UTC 2012
On 04/13/2012 07:04 AM, Jean-Baptiste Rouault wrote:
> Passing a NULL pointer to IMachine::delete virtualbox API
> causes VBoxSVC to raise an assertion. This patch passes
> an empty array instead.
> ---
> src/vbox/vbox_tmpl.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
> index 68e3b05..be25828 100644
> --- a/src/vbox/vbox_tmpl.c
> +++ b/src/vbox/vbox_tmpl.c
> @@ -5294,7 +5294,8 @@ vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
>
> ((IMachine_Delete)machine->vtbl->Delete)(machine, &safeArray, &progress);
> # else
> - machine->vtbl->Delete(machine, 0, NULL, &progress);
> + vboxArray array = VBOX_ARRAY_INITIALIZER;
> + machine->vtbl->Delete(machine, 0, (IMedium**)&array, &progress);
> # endif
ACK and Pushed.
--
Eric Blake eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120417/3816ebc3/attachment-0001.sig>
More information about the libvir-list
mailing list