[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] tools/libxl: Initialise both parts of ctx->sigchld_selfpipe[] to -1
Otherwise, if it is not used, libxl_ctx_free() will close fd 0. Reported-by: Alex Bligh <alex@xxxxxxxxxxx> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 3526539..a1e0b5e 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -71,6 +71,7 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version, ctx->childproc_user = 0; ctx->sigchld_selfpipe[0] = -1; + ctx->sigchld_selfpipe[1] = -1; libxl__ev_fd_init(&ctx->sigchld_selfpipe_efd); /* The mutex is special because we can't idempotently destroy it */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |