]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid leaking headers received from SSL proxy
authorNick Mathewson <nickm@torproject.org>
Sat, 29 Dec 2012 03:44:45 +0000 (22:44 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 29 Dec 2012 03:45:53 +0000 (22:45 -0500)
Fixes part of 7816. Spotted by coverity. Fix on 0.2.2.1-alpha.

changes/bug7816_023
src/or/connection.c

index cfa754a9960cfdb0d4593fd080f0cd0c985abedf..a4530292cc4600f62ce4f5b81ad28dcb0fb9cfc2 100644 (file)
@@ -1,3 +1,7 @@
   o Minor bugfixes (memory leak, controller):
     - Fix a memory leak during safe-cookie controller authentication.
       Spotted by Coverity. Fixes part of bug 7816; bugfix on 0.2.3.13-alpha.
+
+  o Minor bugfixes (memory leak, HTTPS proxy support):
+    - Fix a memory leak when receiving headers from an HTTPS proxy.
+      Spotted by Coverity. Fixes part of bug 7816; bugfix on 0.2.1.1-alpha.
index eac9c4f32bb982ea876dbce73ae98c50107362ba..4c6826269d79dccf57ac63e302ac19762899d767 100644 (file)
@@ -1607,6 +1607,7 @@ connection_read_https_proxy_response(connection_t *conn)
     tor_free(headers);
     return -1;
   }
+  tor_free(headers);
   if (!reason) reason = tor_strdup("[no reason given]");
 
   if (status_code == 200) {