aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl
diff options
context:
space:
mode:
authorMarek Marczykowski <marmarek@invisiblethingslab.com>2013-05-08 05:47:53 +0200
committerIan Campbell <ian.campbell@citrix.com>2013-07-04 10:38:16 +0100
commitaf5102b81fd036976e785aa29dece8c3d2dd6577 (patch)
treedfdb2baa867c69a5ad675a00f4bd77cde367e312 /tools/libxl
parentd3a55d7d9bb518efe08143d050deff9f4ee80ec1 (diff)
downloadxen-af5102b81fd036976e785aa29dece8c3d2dd6577.tar.gz
xen-af5102b81fd036976e785aa29dece8c3d2dd6577.tar.bz2
xen-af5102b81fd036976e785aa29dece8c3d2dd6577.zip
libxl: do not call exit() in libxl_device_vtpm_list
Signal error with NULL return value, do not terminate the whole process. Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl')
-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;
+ }
}
}
}