|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 18/29] libxl: only close fds which successfully opened in libxl__spawn_local_dm
Coverity-ID: 1055565
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
tools/libxl/libxl_dm.c | 4 ++--
1 file 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);
--
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 |