[tor-commits] [tor/master] Fix memory leak in connection_ap_handshake_rewrite_and_attach()
nickm at torproject.org
nickm at torproject.org
Mon Jan 19 16:44:20 UTC 2015
commit 54e4aaf52c882626fe2cce0ba704d9661269ab99
Author: Nick Mathewson <nickm at torproject.org>
Date: Sun Jan 18 14:19:26 2015 -0500
Fix memory leak in connection_ap_handshake_rewrite_and_attach()
Spotted by asn. #14259. Bugfix on 368eb6a97 in 0.2.0.1-alpha.
---
changes/bug14259 | 6 ++++++
src/or/connection_edge.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/changes/bug14259 b/changes/bug14259
new file mode 100644
index 0000000..1b5b9b8
--- /dev/null
+++ b/changes/bug14259
@@ -0,0 +1,6 @@
+ o Minor bugfixes (client):
+ - Avoid a small memory leak when we find a cached answer for a reverse
+ DNS lookup in a client-side DNS cache. (Remember, client-side DNS
+ caching is off by default, and is not recommended.) Fixes bug 14259;
+ bugfix on 0.2.0.1-alpha.
+
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 7a77f5e..7dc8f9c 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1001,6 +1001,7 @@ connection_ap_handshake_rewrite(entry_connection_t *conn,
strlen(result), (uint8_t*)result,
-1,
out->map_expires);
+ tor_free(result);
out->end_reason = END_STREAM_REASON_DONE |
END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED;
out->should_close = 1;
More information about the tor-commits
mailing list