In prnetdb.c, PR_GetIPNodeByName, some error returns in the #if defined(_PR_INET6) && defined(_PR_HAVE_GETHOSTBYNAME2) block towards the end of the function (which appends the IPv4 addresses to the end of the addr list) don't properly clean up. Specifically, at the two places where Alloc() fails, the function just returns PR_FAILURE. It does not set the error code, and it does not unlock the dns lock. This can be fixed by moving that block of code to a different function and having PR_GetIPNodeByName call this new function. Another problem is that we don't need to execute that piece of code if the CopyHostent() call fails.
Checked in the fix on the main trunk. /cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c, revision 3.16
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.1
You need to log in before you can comment on or make changes to this bug.