[PATCH conntrackd 4/8] conntrackd: fix descriptor leak in do_local_request()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/local.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/local.c b/src/local.c
index 453799a..85e5180 100644
--- a/src/local.c
+++ b/src/local.c
@@ -147,11 +147,14 @@ int do_local_request(int request,
 
 	ret = send(fd, &request, sizeof(int), 0);
 	if (ret == -1)
-		return -1;
+		goto err1;
 
 	do_local_client_step(fd, step);
 
 	local_client_destroy(fd);
-	
+
 	return 0;
+err1:
+	local_client_destroy(fd);
+	return -1;
 }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux