debuggers.hg

changeset 22059:251dae6ee4a9

libxl: do not GC data returned to the caller by libxl_device_disk_getinfo.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Ian Campbell <ian.campbell@citrix.com>
date Mon Aug 16 15:31:05 2010 +0100 (2010-08-16)
parents 82eeb70fb65c
children e87c73b32c1b
files tools/libxl/libxl.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Mon Aug 16 15:31:05 2010 +0100
     1.2 +++ b/tools/libxl/libxl.c	Mon Aug 16 15:31:05 2010 +0100
     1.3 @@ -2501,8 +2501,8 @@ int libxl_device_disk_getinfo(libxl_ctx 
     1.4  
     1.5      /* tap devices entries in xenstore are written as vbd devices. */
     1.6      diskpath = libxl_sprintf(&gc, "%s/device/vbd/%d", dompath, diskinfo->devid);
     1.7 -    diskinfo->backend = libxl_xs_read(&gc, XBT_NULL,
     1.8 -                                      libxl_sprintf(&gc, "%s/backend", diskpath));
     1.9 +    diskinfo->backend = xs_read(ctx->xsh, XBT_NULL,
    1.10 +                                libxl_sprintf(&gc, "%s/backend", diskpath), NULL);
    1.11      if (!diskinfo->backend) {
    1.12          libxl_free_all(&gc);
    1.13          return ERROR_FAIL;
    1.14 @@ -2515,8 +2515,8 @@ int libxl_device_disk_getinfo(libxl_ctx 
    1.15      diskinfo->evtch = val ? strtoul(val, NULL, 10) : -1;
    1.16      val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/ring-ref", diskpath));
    1.17      diskinfo->rref = val ? strtoul(val, NULL, 10) : -1;
    1.18 -    diskinfo->frontend = libxl_xs_read(&gc, XBT_NULL,
    1.19 -                                       libxl_sprintf(&gc, "%s/frontend", diskinfo->backend));
    1.20 +    diskinfo->frontend = xs_read(ctx->xsh, XBT_NULL,
    1.21 +                                 libxl_sprintf(&gc, "%s/frontend", diskinfo->backend), NULL);
    1.22      val = libxl_xs_read(&gc, XBT_NULL, libxl_sprintf(&gc, "%s/frontend-id", diskinfo->backend));
    1.23      diskinfo->frontend_id = val ? strtoul(val, NULL, 10) : -1;
    1.24