From: Nick Mathewson Date: Sat, 29 Dec 2012 03:44:45 +0000 (-0500) Subject: Avoid leaking headers received from SSL proxy X-Git-Tag: tor-0.2.4.11-alpha~58^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b509ead20d93277697c1cb961a2ae520bce7fd7f;p=thirdparty%2Ftor.git Avoid leaking headers received from SSL proxy Fixes part of 7816. Spotted by coverity. Fix on 0.2.2.1-alpha. --- diff --git a/changes/bug7816_023 b/changes/bug7816_023 index cfa754a996..a4530292cc 100644 --- a/changes/bug7816_023 +++ b/changes/bug7816_023 @@ -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. diff --git a/src/or/connection.c b/src/or/connection.c index eac9c4f32b..4c6826269d 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -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) {