[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #18374 [Tor]: Small memory leak on parsing a :auto port configuration



#18374: Small memory leak on parsing a :auto port configuration
-------------------------+--------------------------------
     Reporter:  nickm    |      Owner:
         Type:  defect   |     Status:  new
     Priority:  Medium   |  Milestone:  Tor: 0.2.8.x-final
    Component:  Tor      |    Version:
     Severity:  Trivial  |   Keywords:
Actual Points:           |  Parent ID:
       Points:           |    Sponsor:
-------------------------+--------------------------------
 {{{
     } else if (!strcasecmpend(addrport, ":auto")) {
       char *addrtmp = tor_strndup(addrport, strlen(addrport)-5);
       port = CFG_AUTO_PORT;
       if (tor_addr_port_lookup(addrtmp, &addr, &ptmp)<0 || ptmp) {
         log_warn(LD_CONFIG, "Invalid address '%s' for %sPort",
                  escaped(addrport), portname);
         tor_free(addrtmp);
         goto err;
       }
     } else {
 }}}


 On success, nobody frees addrtmp!  Found with asan.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18374>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs