[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: do not call exit() in libxl_device_vtpm_list
commit af5102b81fd036976e785aa29dece8c3d2dd6577 Author: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx> AuthorDate: Wed May 8 05:47:53 2013 +0200 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Jul 4 10:38:16 2013 +0100 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@xxxxxxxxxxxxxxxxxxxxxx> Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 3236aa9..bd63a30 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; + } } } } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |