]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix memory leak in connection_ap_handshake_rewrite_and_attach()
authorNick Mathewson <nickm@torproject.org>
Sun, 18 Jan 2015 19:19:26 +0000 (14:19 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 18 Jan 2015 19:19:26 +0000 (14:19 -0500)
Spotted by asn.  #14259.  Bugfix on 368eb6a97 in 0.2.0.1-alpha.

changes/bug14259 [new file with mode: 0644]
src/or/connection_edge.c

diff --git a/changes/bug14259 b/changes/bug14259
new file mode 100644 (file)
index 0000000..1b5b9b8
--- /dev/null
@@ -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.
+
index 7a77f5e20abb4de11e3f1d6572952fabca391db0..7dc8f9c878befa311cf4c1f449f206a9bb840835 100644 (file)
@@ -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;