aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/libxl/libxl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 3236aa96a0..bd63a305d7 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1861,11 +1861,12 @@ libxl_device_vtpm *libxl_device_vtpm_list(libxl_ctx *ctx, uint32_t domid, int *n
vtpm->backend_domid = atoi(tmp);
tmp = libxl__xs_read(gc, XBT_NULL, GCSPRINTF("%s/uuid", be_path));
- if(tmp) {
- if(libxl_uuid_from_string(&(vtpm->uuid), tmp)) {
- LOG(ERROR, "%s/uuid is a malformed uuid?? (%s) Probably a bug!!\n", be_path, tmp);
- exit(1);
- }
+ if (tmp) {
+ if(libxl_uuid_from_string(&(vtpm->uuid), tmp)) {
+ LOG(ERROR, "%s/uuid is a malformed uuid?? (%s) Probably a bug!!\n", be_path, tmp);
+ free(vtpms);
+ return NULL;
+ }
}
}
}