From 259d1febc93d3c2193c7118c76f199ad68cde6fa Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Mon, 11 Aug 2014 10:50:38 +0300 Subject: [PATCH] emulator: Fix resource leak closing fd --- emulator/b1ee.c | 1 + 1 file changed, 1 insertion(+) diff --git a/emulator/b1ee.c b/emulator/b1ee.c index 17a60fca6..3fb867d86 100644 --- a/emulator/b1ee.c +++ b/emulator/b1ee.c @@ -203,6 +203,7 @@ static int do_connect(const char *node, const char *service) if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) { perror("Failed to connect"); + close(fd); continue; } -- 2.47.3