summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-25 19:01:48 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-25 19:01:48 +0000
commit9492424d3fa009011bfb10d6afe2a1b5e6190173 (patch)
treed6f77a9542c9de823364e2d23ed815dca13b37b6 /src/or/dns.c
parentb39d03116b56d8e8af94480c1d5fb279310d4cc3 (diff)
downloadtor-9492424d3fa009011bfb10d6afe2a1b5e6190173.tar.gz
tor-9492424d3fa009011bfb10d6afe2a1b5e6190173.zip
Per comments at the bottom of openssl/FAQ, call even more functions to
clean up OpenSSL's toys when it's done playing. (Why isn't there an OpenSSL_free_everything() function?) svn:r5321
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index da51ec57be..2534f3875f 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -793,12 +793,14 @@ dnsworker_main(void *data)
info(LD_EXIT,"(Error on %d was %s)", fd, tor_socket_strerror(tor_socket_errno(fd)));
}
tor_close_socket(fd);
+ crypto_thread_cleanup();
spawn_exit();
}
if (address_len && read_all(fd, address, address_len, 1) != address_len) {
err(LD_BUG,"read hostname failed. Child exiting.");
tor_close_socket(fd);
+ crypto_thread_cleanup();
spawn_exit();
}
address[address_len] = 0; /* null terminate it */
@@ -826,6 +828,7 @@ dnsworker_main(void *data)
if (write_all(fd, answer, 5, 1) != 5) {
err(LD_NET,"writing answer failed. Child exiting.");
tor_close_socket(fd);
+ crypto_thread_cleanup();
spawn_exit();
}
}