projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0be2b1
)
libxl: fix dispose without init of disk in cd_insert
author
Matthew Daley
<mattjd@gmail.com>
Wed, 18 Sep 2013 03:37:41 +0000
(15:37 +1200)
committer
Ian Campbell
<ian.campbell@citrix.com>
Wed, 25 Sep 2013 11:44:24 +0000
(12:44 +0100)
Coverity-ID:
1056078
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl_cmdimpl.c
patch
|
blob
|
history
diff --git
a/tools/libxl/xl_cmdimpl.c
b/tools/libxl/xl_cmdimpl.c
index 3d7eaad5e085021059229cad8790e3745b2dda71..a609b98b0f95ace584955d423dfb442c1e1409e4 100644
(file)
--- 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);