Init conn->addr to "unspec" on cpuworker connections

Fixes bug 4532 reported by "troll_un"
This commit is contained in:
Nick Mathewson 2011-12-02 16:21:50 -05:00
parent 57ff9913b2
commit 5303918091
2 changed files with 4 additions and 0 deletions

3
changes/bug4532 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes:
- Initialize conn->addr to a vaild state in spawn_cpuworker. Fixes bug
4532; found by troll_un.

View File

@ -347,6 +347,7 @@ spawn_cpuworker(void)
/* set up conn so it's got all the data we need to remember */
conn->s = fd;
conn->address = tor_strdup("localhost");
tor_addr_make_unspec(&conn->addr);
if (connection_add(conn) < 0) { /* no space, forget it */
log_warn(LD_NET,"connection_add for cpuworker failed. Giving up.");