Closed Bug 334716 Opened 14 years ago Closed 14 years ago

Ineffective allocation check in nsParserService::CreateEntry (nsParserService.cpp)

Categories

(Core :: DOM: HTML Parser, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: kherron+mozilla, Assigned: rflint)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

This was found through a coverity scan of the mozilla source. |nsParserService::CreateEntry| contains the following code:

259   *aEntry = new nsObserverEntry(aTopic);
260 
261   if (!aEntry) {
262     return NS_ERROR_OUT_OF_MEMORY;
263   }

Shirley line 261 should be testing |*aEntry|.
Whiteboard: [good first bug]
Assignee: mrbkap → rflint
Status: NEW → ASSIGNED
Attachment #219217 - Flags: superreview?(jst)
Attachment #219217 - Flags: review?(mrbkap)
Comment on attachment 219217 [details] [diff] [review]
Fix null check on *aEntry

Hey, it was close! ;-)

And don't call me Surely, or something.
Attachment #219217 - Flags: review?(mrbkap) → review+
Comment on attachment 219217 [details] [diff] [review]
Fix null check on *aEntry

sr=jst
Attachment #219217 - Flags: superreview?(jst) → superreview+
Whiteboard: [good first bug] → [checkin needed]
mozilla/parser/htmlparser/src/nsParserService.cpp 	3.19
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha
You need to log in before you can comment on or make changes to this bug.