summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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