[tor-bugs] #28257 [Core Tor/Tor]: CID 1440805: Memory leak in configured_nameserver_address() due to #21900

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 31 05:54:47 UTC 2018


#28257: CID 1440805: Memory leak in configured_nameserver_address() due to #21900
------------------------------+-----------------------------------
     Reporter:  teor          |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  High          |  Milestone:  Tor: 0.3.6.x-final
    Component:  Core Tor/Tor  |    Version:  Tor: unspecified
     Severity:  Normal        |   Keywords:  coverity, memory-leak
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-----------------------------------
 {{{
 ** CID 1440805:  Resource leaks  (RESOURCE_LEAK)
 /src/feature/relay/dns.c: 1389 in configured_nameserver_address()


 ________________________________________________________________________________________________________
 *** CID 1440805:  Resource leaks  (RESOURCE_LEAK)
 /src/feature/relay/dns.c: 1389 in configured_nameserver_address()
 1383        tor_addr_t *tor_addr = tor_malloc(sizeof(tor_addr_t));
 1384        if (tor_addr_from_sockaddr(tor_addr,
 1385                                   (const struct sockaddr *)&sa,
 1386                                   NULL) == 0) {
 1387          return tor_addr;
 1388        }
    CID 1440805:  Resource leaks  (RESOURCE_LEAK)
    Variable "tor_addr" going out of scope leaks the storage it points to.
 1389      }
 1390
 1391      return NULL;
 1392     }
 1393     #endif
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28257>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list