[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/3] libxl: use libxl__read_xenstore_check in vdispl function
Coverity-ID: 1418097 Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl_vdispl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_vdispl.c b/tools/libxl/libxl_vdispl.c index 5740c89fad..cfee0f5cdf 100644 --- a/tools/libxl/libxl_vdispl.c +++ b/tools/libxl/libxl_vdispl.c @@ -40,10 +40,13 @@ static int libxl__vdispl_from_xenstore(libxl__gc *gc, const char *libxl_path, libxl_devid devid, libxl_device_vdispl *vdispl) { - char *be_path; + const char *be_path; + int rc; vdispl->devid = devid; - be_path = libxl__xs_read(gc, XBT_NULL, GCSPRINTF("%s/backend", libxl_path)); + rc = libxl__xs_read_checked(gc, XBT_NULL, + GCSPRINTF("%s/backend", libxl_path), &be_path); + if (rc) return rc; return libxl__backendpath_parse_domid(gc, be_path, &vdispl->backend_domid); } -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |