aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap
diff options
context:
space:
mode:
Diffstat (limited to 'tools/blktap')
-rw-r--r--tools/blktap/lib/xenbus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/blktap/lib/xenbus.c b/tools/blktap/lib/xenbus.c
index c238d5fe9a..53db3c8b29 100644
--- a/tools/blktap/lib/xenbus.c
+++ b/tools/blktap/lib/xenbus.c
@@ -232,8 +232,11 @@ static int check_sharing(struct xs_handle *h, struct backend_info *be)
ret = -1;
break;
}
+ cur_dom_uuid = NULL;
xs_gather(h, path, "vm", NULL, &cur_dom_uuid, NULL);
free(path);
+ if (!cur_dom_uuid)
+ continue;
if (!strcmp(cur_dom_uuid, dom_uuid)) {
free(cur_dom_uuid);
@@ -256,8 +259,11 @@ static int check_sharing(struct xs_handle *h, struct backend_info *be)
ret = -1;
break;
}
+ params = NULL;
xs_gather(h, path, "params", NULL, &params, NULL);
free(path);
+ if (!params)
+ continue;
image_path[1] = get_image_path(params);
if (!strcmp(image_path[0], image_path[1])) {