From ff070a6b4646abc50b3806ae70e8726661fbd1b4 Mon Sep 17 00:00:00 2001 From: Belobrov Andrey Date: Fri, 14 Feb 2014 08:32:38 +0400 Subject: [PATCH] Fixed possible file descriptor leak. --- common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common.c b/common.c index 72c351a..963fa4c 100644 --- a/common.c +++ b/common.c @@ -155,6 +155,7 @@ int connect_addr(struct connection *cnx, int fd_from) if (res == -1) { log_message(LOG_ERR, "forward to %s failed:connect: %s\n", cnx->proto->description, strerror(errno)); + close(fd); } else { return fd; }