From eb2ebe746899f58e9cc1552dd0165664dbb4df19 Mon Sep 17 00:00:00 2001 From: dlezcano Date: Wed, 3 Sep 2008 09:28:50 +0000 Subject: [PATCH] close fd monitor on error --- src/liblxc/monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liblxc/monitor.c b/src/liblxc/monitor.c index 3f247dd19..fec80fe8e 100644 --- a/src/liblxc/monitor.c +++ b/src/liblxc/monitor.c @@ -145,6 +145,7 @@ int lxc_monitor_open(const char *name) if (bind(fd, (const struct sockaddr *)&addr, sizeof(addr))) { lxc_log_syserror("failed to bind to '%s'", addr.sun_path); + close(fd); return -1; }