close fd on error path

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2013-04-24 19:49:59 -05:00
parent 4fa22bfca1
commit e8b9ac8fdf

View File

@ -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;
}