From: Keir Fraser Date: Fri, 11 Dec 2009 08:47:51 +0000 (+0000) Subject: libxenlight: fix cd-insert cli arguments parsing X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12932 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dcf8b0114d60b057d94007dba3ca7f4e758da89c;p=xen.git libxenlight: fix cd-insert cli arguments parsing Signed-off-by: Stefano Stabellini --- diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 99f89c0700..fa92ae3f4d 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -904,10 +904,10 @@ void cd_insert(char *dom, char *virtdev, char *phys) 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;