]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory leak in tor-resolve.c
authorNick Mathewson <nickm@torproject.org>
Thu, 11 Apr 2019 23:09:23 +0000 (19:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 11 Apr 2019 23:10:05 +0000 (19:10 -0400)
Closes bug 30151/coverity CID 1441830. Bugfix on 0.4.0.1-alpha when
we started doing trunnel parsing in tor-resolve.c.

changes/bug30151 [new file with mode: 0644]
src/tools/tor-resolve.c

diff --git a/changes/bug30151 b/changes/bug30151
new file mode 100644 (file)
index 0000000..8ac9a32
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (tor-resolve):
+    - Fix a memory leak in tor-resolve that could happen if Tor gave it a
+      malformed SOCKS response.  (Memory leaks in tor-resolve don't actually
+      matter, but it's good to fix them anyway.)  Fixes bug 30151; bugfix on
+      0.4.0.1-alpha.
index 98b3a4a74ceee5f6ce001ef990038464c6127ec6..5d97696c1882c7b0749fd7ed0477a61ecc858744 100644 (file)
@@ -424,6 +424,7 @@ do_resolve(const char *hostname,
     if (parsed < 2) {
       log_err(LD_NET, "Failed to parse SOCKS5 method selection "
                       "message");
+      socks5_server_method_free(m);
       goto err;
     }