Last Comment Bug 226686 - The WINNT version of PR_Accept leaks a socket handle if it fails.
: The WINNT version of PR_Accept leaks a socket handle if it fails.
Status: RESOLVED FIXED
:
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: 4.3
: x86 Windows 2000
: -- normal (vote)
: 4.4.1
Assigned To: Wan-Teh Chang
: Wan-Teh Chang
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 16:35 PST by Wan-Teh Chang
Modified: 2004-03-03 08:57 PST (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch (3.26 KB, patch)
2003-11-24 16:36 PST, Wan-Teh Chang
darin.moz: review+
Details | Diff | Splinter Review

Description Wan-Teh Chang 2003-11-24 16:35:43 PST
The WINNT version of PR_Accept and PR_AcceptRead creates
a new socket (or gets one from its socket recycle list)
and calls AcceptEx to accept a new connection on the new
socket.

It does not close the socket or put the socket to the
socket recycle list when it fails.
Comment 1 Wan-Teh Chang 2003-11-24 16:36:33 PST
Created attachment 136256 [details] [diff] [review]
Proposed patch

Close the new socket if PR_Accept or PR_AcceptRead fails.
Comment 2 Wan-Teh Chang 2003-11-24 17:21:19 PST
Patch checked into the NSPR tip (4.5) and
NSPR_4_4_BRANCH (4.4.1).
Comment 3 Wan-Teh Chang 2003-11-24 17:22:17 PST
Comment on attachment 136256 [details] [diff] [review]
Proposed patch

Darin, if you don't have time to review this patch
this week, just cancel the review request.  Thanks.
Comment 4 Darin Fisher 2004-03-03 08:57:32 PST
Comment on attachment 136256 [details] [diff] [review]
Proposed patch

fwiw, r=darin

Note You need to log in before you can comment on or make changes to this bug.