[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.2] tools/xenconsoled: Fix file handle leaks
commit 7732f0d10dc38b8a9d3c3c38bf7c483f36c00e00 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Nov 25 11:06:39 2013 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Thu Jan 9 12:35:47 2014 +0000 tools/xenconsoled: Fix file handle leaks Coverity ID: 715218 1055876 1055877 Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> (cherry picked from commit 9ab1792e1ce9e77afe2cd230d69e56a0737a735f) (cherry picked from commit 6f6d936af8acb7d9e36b70e5e70953f695ca3b36) --- tools/console/daemon/io.c | 2 ++ tools/console/daemon/utils.c | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 48fe151..367c4fb 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -270,6 +270,7 @@ static int create_hv_log(void) dolog(LOG_ERR, "Failed to log opening timestamp " "in %s: %d (%s)", logfile, errno, strerror(errno)); + close(fd); return -1; } } @@ -315,6 +316,7 @@ static int create_domain_log(struct domain *dom) dolog(LOG_ERR, "Failed to log opening timestamp " "in %s: %d (%s)", logfile, errno, strerror(errno)); + close(fd); return -1; } } diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c index aab6f42..71dd185 100644 --- a/tools/console/daemon/utils.c +++ b/tools/console/daemon/utils.c @@ -104,6 +104,7 @@ void daemonize(const char *pidfile) signal(SIGTSTP, SIG_IGN); signal(SIGTTOU, SIG_IGN); signal(SIGTTIN, SIG_IGN); + close(fd); } bool xen_setup(void) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.2 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |