http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5531

           Summary: libspamc leaks tp->hosts array
           Product: Spamassassin
           Version: 3.2.1
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


int transport_setup(struct transport *tp, int flags)

copies pointers from getaddrinfo() into tp->hosts, but they are never freed
using the required freeaddrinfo().
there's this:

#ifdef SPAMC_HAS_ADDRINFO
    for(numloops=0;numloops<tp->nhosts;numloops++) {
        freeaddrinfo(tp->hosts[numloops]);
    }
#endif

but that is only run for an error condition. :(

We need something to frees the tp->hosts array when no longer used. this may
require addition of a transport_finish() or transport_free() func to the API.

_randomize_hosts() also needs to call freeaddrinfo() as it removes entries.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to