Closed
Bug 40529
Opened 25 years ago
Closed 25 years ago
Some error returns in PR_GetIPNodeByName don't properly clean up
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
4.1
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
3.56 KB,
patch
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•25 years ago
|
||
Assignee | ||
Comment 2•25 years ago
|
||
Checked in the fix on the main trunk.
/cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c, revision 3.16
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.1
You need to log in
before you can comment on or make changes to this bug.
Description
•