[PATCH] vbox: avoid provoking assertions in VBoxSVC

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

 



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
         if (progress != NULL) {
             progress->vtbl->WaitForCompletion(progress, -1);
-- 
1.7.9.1

--
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]