# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281969065 -3600
# Node ID 5f7df0947ce97ba5ec604bacd09694ed399c2729
# Parent 9ff0821b2c7915051a64ca89ec9c64a4484c16ad
libxl: do not GC data returned to the caller by libxl_device_disk_getinfo.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 9ff0821b2c79 -r 5f7df0947ce9 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Mon Aug 16 15:31:05 2010 +0100
+++ b/tools/libxl/libxl.c Mon Aug 16 15:31:05 2010 +0100
@@ -2539,8 +2539,8 @@ int libxl_device_disk_getinfo(libxl_ctx
/* tap devices entries in xenstore are written as vbd devices. */
diskpath = libxl_sprintf(&gc, "%s/device/vbd/%d", dompath,
diskinfo->devid);
- diskinfo->backend = libxl_xs_read(&gc, XBT_NULL,
- libxl_sprintf(&gc, "%s/backend",
diskpath));
+ diskinfo->backend = xs_read(ctx->xsh, XBT_NULL,
+ libxl_sprintf(&gc, "%s/backend", diskpath),
NULL);
if (!diskinfo->backend) {
libxl_free_all(&gc);
return ERROR_FAIL;
@@ -2553,8 +2553,8 @@ int libxl_device_disk_getinfo(libxl_ctx
diskinfo->evtch = val ? strtoul(val, NULL, 10) : -1;
val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/ring-ref",
diskpath));
diskinfo->rref = val ? strtoul(val, NULL, 10) : -1;
- diskinfo->frontend = libxl_xs_read(&gc, XBT_NULL,
- libxl_sprintf(&gc, "%s/frontend",
diskinfo->backend));
+ diskinfo->frontend = xs_read(ctx->xsh, XBT_NULL,
+ libxl_sprintf(&gc, "%s/frontend",
diskinfo->backend), NULL);
val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/frontend-id",
diskinfo->backend));
diskinfo->frontend_id = val ? strtoul(val, NULL, 10) : -1;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|