I inadvertently introduced this with commit 8bf1e61e.

Signed-off-by: Dwight Engen <[email protected]>
---
 src/lxc/monitor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c
index 4ca4000..f356adf 100644
--- a/src/lxc/monitor.c
+++ b/src/lxc/monitor.c
@@ -106,8 +106,10 @@ static void lxc_monitor_fifo_send(struct lxc_msg *msg, 
const char *lxcpath)
                return;
        }
 
-       if (fcntl(fd, F_SETFL, O_WRONLY) < 0)
+       if (fcntl(fd, F_SETFL, O_WRONLY) < 0) {
+               close(fd);
                return;
+       }
 
        ret = write(fd, msg, sizeof(*msg));
        if (ret != sizeof(*msg)) {
-- 
1.9.0

_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to