Fix a memory leak in tor-resolve.c

Closes bug 30151/coverity CID 1441830. Bugfix on 0.4.0.1-alpha when
we started doing trunnel parsing in tor-resolve.c.
This commit is contained in:
Nick Mathewson 2019-04-11 19:09:23 -04:00
parent 40471d73e5
commit cdafcc49bc
2 changed files with 6 additions and 0 deletions

5
changes/bug30151 Normal file
View File

@ -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.

View 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;
}