[libvirt] [PATCH] qemu: Remove redundant code in qemuParseCommandLineDisk

Kothapally Madhu Pavan kmp at linux.vnet.ibm.com
Sun Oct 8 09:24:53 UTC 2017


Signed-off-by: Kothapally Madhu Pavan <kmp at linux.vnet.ibm.com>
---
 src/qemu/qemu_parse_command.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 37e1149..7c409b0 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -945,9 +945,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
     if (virDomainDiskDefAssignAddress(xmlopt, def, dom) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("invalid device name '%s'"), def->dst);
-        virDomainDiskDefFree(def);
-        def = NULL;
-        goto cleanup;
+        goto error;
     }
 
  cleanup:
-- 
1.8.3.1




More information about the libvir-list mailing list