[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: fix segfault when detaching non-existant disk
# HG changeset patch # User Gianni Tedesco <gianni.tedesco@xxxxxxxxxx> # Date 1280244184 -3600 # Node ID 5078f2c1e3d6a3a06ecf352a068eb496f09a2a98 # Parent 92e02df7ef7e6003d005a5ec572e804a5c4114b9 libxl: fix segfault when detaching non-existant disk Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_utils.c | 2 ++ 1 files changed, 2 insertions(+) diff -r 92e02df7ef7e -r 5078f2c1e3d6 tools/libxl/libxl_utils.c --- a/tools/libxl/libxl_utils.c Mon Jul 26 11:29:11 2010 +0100 +++ b/tools/libxl/libxl_utils.c Tue Jul 27 16:23:04 2010 +0100 @@ -451,6 +451,8 @@ int libxl_devid_to_device_disk(struct li } val = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/backend-id", diskpath)); + if (!val) + return ERROR_FAIL; disk->backend_domid = strtoul(val, NULL, 10); disk->domid = domid; be_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/backend", diskpath)); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |