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

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
x86
macOS
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
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: 11 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.