From: Serge Hallyn Date: Thu, 25 Apr 2013 00:49:59 +0000 (-0500) Subject: close fd on error path X-Git-Tag: lxc-1.0.0.alpha1~1^2~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8b9ac8fdfddec6a2eaacd6cdaa968058cf4e1e2;p=thirdparty%2Flxc.git close fd on error path Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index e108eb764..0521e9ab3 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -69,6 +69,7 @@ static void lxc_monitor_fifo_send(struct lxc_msg *msg, const char *lxcpath) ret = write(fd, msg, sizeof(*msg)); if (ret != sizeof(*msg)) { + close(fd); SYSERROR("failed to write monitor fifo %s", fifo_path); return; }