|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] libxenlight: returns errors if xc and/or
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1262951134 0
# Node ID dda8dc485d67a15af00ff01766118e932a83afd3
# Parent 5254234fdb71d7d77910b1f86e2abfab201e7451
libxenlight: returns errors if xc and/or xs has not been initialized properly.
fixed segfault when xenstore or xc are not available.
Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
tools/libxl/libxl.c | 10 ++++++++++
1 files changed, 10 insertions(+)
diff -r 5254234fdb71 -r dda8dc485d67 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Jan 08 11:44:58 2010 +0000
+++ b/tools/libxl/libxl.c Fri Jan 08 11:45:34 2010 +0000
@@ -45,7 +45,17 @@ int libxl_ctx_init(struct libxl_ctx *ctx
return ERROR_NOMEM;
ctx->xch = xc_interface_open();
+ if (ctx->xch == -1) {
+ free(ctx->alloc_ptrs);
+ return ERROR_FAIL;
+ }
+
ctx->xsh = xs_daemon_open();
+ if (!ctx->xsh) {
+ xc_interface_close(ctx->xch);
+ free(ctx->alloc_ptrs);
+ return ERROR_FAIL;
+ }
return 0;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] libxenlight: returns errors if xc and/or xs has not been initialized properly.,
Xen patchbot-unstable <=
|
|
|
|
|