memory management errors in nsCoreAnimationSupport.mm

RESOLVED FIXED in mozilla12

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

Trunk
mozilla12
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 582212 [details] [diff] [review]
fix potential leaks found by static analysis

Potential leaks noted in the static analysis reports:
http://people.mozilla.org/~gszorc/clang/2011-12-15-13/report-74UjgP.html#EndPath
http://people.mozilla.org/~gszorc/clang/2011-12-15-13/report-7ompG0.html#EndPath
http://people.mozilla.org/~gszorc/clang/2011-12-15-13/report-dhueRI.html#EndPath
http://people.mozilla.org/~gszorc/clang/2011-12-15-13/report-eKkcGp.html#EndPath
http://people.mozilla.org/~gszorc/clang/2011-12-15-13/report-WQpx10.html#EndPath

Most of these are in a DEBUG-only diagnostic function, so wouldn't affect normal users, but we should still tidy them up.

I've also removed a couple of redundant NULL-checks that I noticed in passing - the CG*Release APIs are documented as NULL-safe.
Attachment #582212 - Flags: review?(bgirard)
Blocks: 712350
Comment on attachment 582212 [details] [diff] [review]
fix potential leaks found by static analysis

Sorry I missed the review email and saw this today! These are all good changes. I'm not a fan of removing the null check before release even if the API allows it because it will cause others to wonder and have to check the documentation.
Attachment #582212 - Flags: review?(bgirard) → review+
(Assignee)

Comment 2

5 years ago
(In reply to Benoit Girard (:BenWa) from comment #1)
> I'm not a fan of removing the null check before release even if the
> API allows it because it will cause others to wonder and have to check the
> documentation.
OK, I removed these two extra chunks from the patch prior to pushing it.

https://hg.mozilla.org/integration/mozilla-inbound/rev/d58132b4ecc4
Target Milestone: --- → mozilla12

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d58132b4ecc4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.