Closed Bug 483788 Opened 14 years ago Closed 14 years ago

[FIX]NS_NewChannel leaks if protocol handler returns a channel and error

Categories

(Core :: Networking, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

Arguably this is correct COM behavior (assume the out param is untouched on error), but in practice we don't do a good job of it.
outparams supposedly warns about such issues, but the false-positive count is still high enough not to be very useful.
Attached patch Proposed patchSplinter Review
Attachment #367767 - Flags: review?(benjamin)
Comment on attachment 367767 [details] [diff] [review]
Proposed patch

Shouldn't you fix the protocol handler instead?
I did that too, of course; this is a belt-and-suspenders thing.  I can't see any drawbacks to this change, but if you see one I'd love to hear about it.
Ah ok, this seems fine then.
Attachment #367767 - Flags: review?(benjamin) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/6da5efbfef2c
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.