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

[Xen-devel] [PATCH] libxenlight: fix cd-insert cli arguments parsing



Hi all,
this patch fixes a bug in the command line arguments parsing code of
cd_insert.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 9d22971d3f32 tools/libxl/xl.c
--- a/tools/libxl/xl.c  Wed Dec 09 15:37:32 2009 +0000
+++ b/tools/libxl/xl.c  Wed Dec 09 15:57:54 2009 +0000
@@ -904,10 +904,10 @@
                 disk.phystype = PHYSTYPE_FILE;
             }
         } else {
-            p = '\0';
-            disk.physpath = strdup(p);
+            *p = '\0';
             p++;
-            libxl_string_to_phystype(&ctx, p, &disk.phystype);
+            disk.physpath = p;
+            libxl_string_to_phystype(&ctx, phys, &disk.phystype);
         }
     } else {
             disk.physpath = NULL;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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