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

[libvirt] [PATCH] vbox: Don't overwrite errors returned by virDomainDeviceDefParse



---
 src/vbox/vbox_tmpl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 00b4d3d..cd88579 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -5388,10 +5388,8 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
 
     dev = virDomainDeviceDefParse(data->caps, def, xml,
                                   VIR_DOMAIN_XML_INACTIVE);
-    if (dev == NULL) {
-        virReportOOMError();
+    if (dev == NULL)
         goto cleanup;
-    }
 
     vboxIIDFromUUID(&iid, dom->uuid);
     rc = VBOX_OBJECT_GET_MACHINE(iid.value, &machine);
@@ -5625,10 +5623,8 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) {
 
     dev = virDomainDeviceDefParse(data->caps, def, xml,
                                   VIR_DOMAIN_XML_INACTIVE);
-    if (dev == NULL) {
-        virReportOOMError();
+    if (dev == NULL)
         goto cleanup;
-    }
 
     vboxIIDFromUUID(&iid, dom->uuid);
     rc = VBOX_OBJECT_GET_MACHINE(iid.value, &machine);
-- 
1.8.1.2


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