[tor-commits] [torsocks/master] Make sure pipe_fds is initialized in error branch.
dgoulet at torproject.org
dgoulet at torproject.org
Mon Jun 13 21:14:03 UTC 2016
commit c36bc4382ae4c0d1cc56fe1d2cd4fbdf489b1bab
Author: Taylor R Campbell <campbell+torsocks at mumble.net>
Date: Wed Jun 17 17:48:09 2015 +0000
Make sure pipe_fds is initialized in error branch.
Caught by clang static analyzer.
---
tests/test_fd_passing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_fd_passing.c b/tests/test_fd_passing.c
index 70d3fef..8d41496 100644
--- a/tests/test_fd_passing.c
+++ b/tests/test_fd_passing.c
@@ -390,7 +390,7 @@ error:
void *thread_send(void *data)
{
- int sock, fds[3], pipe_fds[2];
+ int sock, fds[3], pipe_fds[2] = {-1, -1};
ssize_t len;
sock = connect_unix_sock(sockpath);
More information about the tor-commits
mailing list