Closed
Bug 138081
Opened 22 years ago
Closed 22 years ago
nsDataChannel::ParseData leaks on various failures
Categories
(Core :: Networking, defect, P1)
Core
Networking
Tracking
()
VERIFIED
FIXED
mozilla1.1alpha
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
3.13 KB,
patch
|
timeless
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
dataToWrite is leaked on all those wonderful |if (NS_FAILED(rv)) return rv;| blocks that come after it has been allocated. If we're dealing with non-text data, dataBuffer is leaked as well.
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
to me
Assignee: new-network-bugs → bzbarsky
Priority: -- → P1
Target Milestone: --- → mozilla1.1alpha
Attachment #79735 -
Flags: review+
Comment 3•22 years ago
|
||
Comment on attachment 79735 [details] [diff] [review] Patch v1.0 Index: protocol/data/src/nsDataChannel.cpp >@@ -204,12 +211,18 @@ >+ // XXX PL_Base64Decode will return a null pointer for decoding >+ // errors. Since those are more likely than out-of-memory, >+ // should we return NS_ERROR_MALFORMED_URI instead? how about NS_ERROR_UNEXPECTED? nice work! sr=darin
Attachment #79735 -
Flags: superreview+
Assignee | ||
Comment 4•22 years ago
|
||
Checked in on trunk, with NS_ERROR_UNEXPECTED as the error.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•22 years ago
|
||
This does not build on Windows, apparently. I backed it out and will work on a different fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•22 years ago
|
||
OK, this builds on windows if I move the PRUint32 dataLen = PL_strlen(dataBuffer); line to before the goto that's above it. So I'll be relanding this with that change...
Assignee | ||
Comment 7•22 years ago
|
||
relanded
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 8•22 years ago
|
||
Verified per bzbarsky's comments.
Status: RESOLVED → VERIFIED
QA Contact: benc → junruh
You need to log in
before you can comment on or make changes to this bug.
Description
•