[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-cvs
Subject:    [Xen-changelog] [xen master] tools/libxl: Initialise both parts of ctx->sigchld_selfpipe[] to -1
From:       patchbot () xen ! org
Date:       2014-08-30 13:01:27
Message-ID: E1XNiHX-000792-If () xenbits ! xen ! org
[Download RAW message or body]

commit fa13f7b0c0f3d01741e35d573009503c3bf7b6a6
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 18 14:02:37 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Aug 27 02:30:25 2014 +0100

    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@alex.org.uk>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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 */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic