From d39499f6afa991c52e4f67f8f68f4021f1524244 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 20 Mar 2024 16:47:09 +0100 Subject: [PATCH] Do not leak socket in case of success. Signed-off-by: Jindrich Novy --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index a089560..3f73e1e 100644 --- a/main.c +++ b/main.c @@ -225,6 +225,7 @@ static int configure_network(const char *tapname, perror("set route"); goto fail; } + close(sockfd); return 0; fail: close(sockfd);