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.
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.
(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