[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torsocks/master] Make sure pipe_fds is initialized in error branch.



commit c36bc4382ae4c0d1cc56fe1d2cd4fbdf489b1bab
Author: Taylor R Campbell <campbell+torsocks@xxxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits