summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-02 12:58:32 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-02 12:58:32 -0400
commit1a2f2c163f68f888e45908e6493a273eb48b6236 (patch)
treefbfdd91ab91bc68bfe85b9841d62cbbb39cf6dcc /src
parent57c48bf7342d8df9bd3fbd8d52d6bf570b2ecac2 (diff)
downloadtor-1a2f2c163f68f888e45908e6493a273eb48b6236.tar.gz
tor-1a2f2c163f68f888e45908e6493a273eb48b6236.zip
Explicitly initialize addresses in tor_ersatz_socketpair
This should stop a false positive from the clangalyzer.
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 278e5c5241..ad627f13f3 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1435,6 +1435,9 @@ tor_ersatz_socketpair(int family, int type, int protocol, tor_socket_t fd[2])
socklen_t size;
int saved_errno = -1;
+ memset(&connect_addr, 0, sizeof(connect_addr));
+ memset(&listen_addr, 0, sizeof(listen_addr));
+
if (protocol
#ifdef AF_UNIX
|| family != AF_UNIX