summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-08-18 18:59:18 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-08-18 19:22:06 +0200
commit99dc0ba1e12c40a1c69c6f831a78a06248b3e2a4 (patch)
tree629a4e1e5137880a63ffd1e51cfc6fc3c666ade3 /src
parentbe691dc236610ab349c3bffb9a891613f75c6ebe (diff)
downloadconntrack-tools-99dc0ba1e12c40a1c69c6f831a78a06248b3e2a4.tar.gz
conntrack-tools-99dc0ba1e12c40a1c69c6f831a78a06248b3e2a4.zip
conntrackd: fix descriptor leak in do_local_request()
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/local.c7
1 files 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;
}