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

[Xen-devel] [PATCH 05/28] libxl: fix dispose without init of disk in cd_insert



Coverity-ID: 1056078
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 3d7eaad..a609b98 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2529,18 +2529,16 @@ int main_memset(int argc, char **argv)
 
 static int cd_insert(uint32_t domid, const char *virtdev, char *phys)
 {
-    libxl_device_disk disk; /* we don't free disk's contents */
+    libxl_device_disk disk;
     char *buf = NULL;
     XLU_Config *config = 0;
     struct stat b;
     int rc = 0;
 
-
     if (asprintf(&buf, "vdev=%s,access=r,devtype=cdrom,target=%s",
                  virtdev, phys ? phys : "") < 0) {
         fprintf(stderr, "out of memory\n");
-        rc = 1;
-        goto out;
+        return 1;
     }
 
     parse_disk_config(&config, buf, &disk);
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.