Bug 1111 - memory leak in openbsd-compat/getrrsetbyname.c, function: getrrsetbyname
Summary: memory leak in openbsd-compat/getrrsetbyname.c, function: getrrsetbyname
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.2p1
Hardware: Other All
: P2 normal
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks: 1047
  Show dependency treegraph
 
Reported: 2005-11-04 18:02 AEDT by Ted Kremenek
Modified: 2006-10-07 11:43 AEST (History)
0 users

See Also:


Attachments
sync getrrsetbyname.c (5.65 KB, patch)
2005-11-05 15:46 AEDT, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Kremenek 2005-11-04 18:02:52 AEDT
In the function getrrsetbyname...

memory allocated by the call to parse_dns_response (which calls calloc):

        /* parse result */
        response = parse_dns_response(answer, length);

... appears to be leaked on all paths in this function.
Comment 1 Damien Miller 2005-11-05 15:46:53 AEDT
Created attachment 1023 [details]
sync getrrsetbyname.c

This can be resolved by syncing our compat code to OpenBSD's latest version of getrrsetbyname(), which already includes fixes for these leaks.
Comment 2 Damien Miller 2005-11-05 16:57:22 AEDT
sync applied and will be in 4.3p1, thanks for the report.
Comment 3 Darren Tucker 2006-10-07 11:43:05 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.