[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: only close fds which successfully opened in libxl__spawn_local_dm
commit 2ffc14ea225096e2970a86c13bec6c7fc2df822b Author: Matthew Daley <mattjd@xxxxxxxxx> AuthorDate: Wed Oct 30 20:51:54 2013 +1300 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Oct 31 21:55:52 2013 +0000 libxl: only close fds which successfully opened in libxl__spawn_local_dm Coverity-ID: 1055565 Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_dm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index ef29d0b..24eebda 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1259,8 +1259,8 @@ retry_transaction: rc = 0; out_close: - close(null); - close(logfile_w); + if (null != -1) close(null); + if (logfile_w != -1) close(logfile_w); out: if (rc) device_model_spawn_outcome(egc, dmss, rc); -- 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 |