Introduction
Introduction Statistics Contact Development Disclaimer Help
freeaddrinfo can leak if a connection fails in connectto() - sacc - sacc - sacc…
git clone git://git.codemadness.org/sacc
Log
Files
Refs
LICENSE
---
commit 10ed3e55246b65f39aa19f3c63bb0241c62d4f6c
parent 18a92be39ac2fea50ce2d63c7a03ad64528eb843
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 25 Dec 2018 19:32:54 +0100
freeaddrinfo can leak if a connection fails in connectto()
Diffstat:
M sacc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/sacc.c b/sacc.c
@@ -478,6 +478,9 @@ connectto(const char *host, const char *port)
}
break;
}
+
+ freeaddrinfo(addrs);
+
if (sock < 0) {
diag("Can't open socket: %s", strerror(errno));
return -1;
@@ -488,8 +491,6 @@ connectto(const char *host, const char *port)
return -1;
}
- freeaddrinfo(addrs);
-
return sock;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.