[tor-bugs] #8070 [Torsocks]: Memory leaks on error in dead_pool.c
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jan 28 03:05:48 UTC 2013
#8070: Memory leaks on error in dead_pool.c
----------------------+-----------------------------------------------------
Reporter: dgoulet | Owner: ioerror
Type: defect | Status: new
Priority: normal | Milestone:
Component: Torsocks | Version:
Keywords: | Parent:
Points: | Actualpoints:
----------------------+-----------------------------------------------------
In parse_socks5_resolve_ptr_response() (dead_pool.c +325), the
**result_hostname is allocated then passed to recv(). On error (r < 0) or
with an orderly shutdown (r = 0) the memory is not freed causing the
memory leak.
Here is a small patch fixing the leak.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8070>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list