superreview granted: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks

neil@parkwaycc.co.uk <neil@httl.net> has granted Mark Banner
<bugzilla@standard8.plus.com>'s request for superreview:
Bug 431414: Review MailNews uses of idl functions that return xpcom allocat=
ed
arrays [..., array, ...] for memory leaks
https://bugzilla.mozilla.org/show_bug.cgi?id=3D431414

Attachment 318566: Fix memory leaks
https://bugzilla.mozilla.org/attachment.cgi?id=3D318566&action=3Dedit

------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net>
>+    // Ensure any old data is freed if necessary.=0D
>+    if (mSearchAttrs) {=0D
>+	  NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(mSearchAttrsSize,
mSearchAttrs);=0D
>+    }=0D
Nit: ought to set mSearchAttrs to nsnull in case GetAttributes fails.=0D
=0D
>+	nsMemory::Free(newMessageKeys);=0D
Nit: NS_Free (and below)=0D
=0D
>+  nsMemory::Free(newKeys);=0D
>+  newKeys =3D 0;=0D
Nit: newKeys doesn't get used again, so no need to clear it this time!=
0
bugzilla
5/1/2008 4:19:00 PM
mozilla.dev.super-review 29307 articles. 3 followers. Post Follow

0 Replies
617 Views

Similar Articles

[PageSpeed] 36

Reply:

Similar Artilces:

superreview requested: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks
Mark Banner <bugzilla@standard8.plus.com> has asked Dan Mosedale <dmose@mozilla.org> for superreview: Bug 431414: Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=431414 Attachment 318566: Fix memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=318566&action=edit ------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com> This fixes the memory leaks I have found by going through: http://mxr.mozilla.org/seamonkey/search?string=array&...

superreview granted: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 319371] Fix memory leaks v2
Mark Banner <bugzilla@standard8.plus.com> has granted superreview: Bug 431414: Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=431414 Attachment 319371: Fix memory leaks v2 https://bugzilla.mozilla.org/attachment.cgi?id=319371&action=edit ------- Additional Comments from Mark Banner <bugzilla@standard8.plus.com> Fixes Neil's comments, carrying forward his sr. ...

superreview granted: [Bug 306785] memory leaks in PQG_ParamGenSeedLen : [Attachment 194622] fix for memory leaks
Robert Relyea <rrelyea@redhat.com> has granted Julien Pierre <julien.pierre.bugs@sun.com>'s request for superreview: Bug 306785: memory leaks in PQG_ParamGenSeedLen https://bugzilla.mozilla.org/show_bug.cgi?id=306785 Attachment 194622: fix for memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=194622&action=edit ------- Additional Comments from Robert Relyea <rrelyea@redhat.com> Your code is correct wrt getPQseed(). We know seedBytes doesn't change, so it's clearly a waste to allocate each time through. bob ...

superreview granted: [Bug 429230] memory leak in pkix_CheckCert function : [Attachment 315876] Patch v1(remove debug code that leaks memory)
Kai Engert (:kaie) <kengert@redhat.com> has granted Alexei Volkov <alexei.volkov.bugs@sun.com>'s request for superreview: Bug 429230: memory leak in pkix_CheckCert function https://bugzilla.mozilla.org/show_bug.cgi?id=429230 Attachment 315876: Patch v1(remove debug code that leaks memory) https://bugzilla.mozilla.org/attachment.cgi?id=315876&action=edit ------- Additional Comments from Kai Engert (:kaie) <kengert@redhat.com> You remove a lot of code, is that all equivalent to PKIX_CHECK ? ...

superreview granted: [Bug 149110] Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) : [Attachment 135201] -w the leak is fixed by the change to nsMsgNewsFolder::Shut
David Bienvenu <bienvenu@nventure.com> has granted timeless@myrealbox.com <timeless@bemail.org>'s request for superreview: Bug 149110: Memory leak of 20 bytes from 1 block allocated in nsMsgKeySet::Create(char const*) http://bugzilla.mozilla.org/show_bug.cgi?id=149110 Attachment 135201: -w the leak is fixed by the change to nsMsgNewsFolder::Shutdown http://bugzilla.mozilla.org/attachment.cgi?id=135201&action=edit ------- Additional Comments from David Bienvenu <bienvenu@nventure.com> looks OK, thx, except that K&R is not the prevailing braces style i...

superreview requested: [Bug 306785] memory leaks in PQG_ParamGenSeedLen : [Attachment 194622] fix for memory leaks
Julien Pierre <julien.pierre.bugs@sun.com> has asked Robert Relyea <rrelyea@redhat.com> for superreview: Bug 306785: memory leaks in PQG_ParamGenSeedLen https://bugzilla.mozilla.org/show_bug.cgi?id=306785 Attachment 194622: fix for memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=194622&action=edit ------- Additional Comments from Julien Pierre <julien.pierre.bugs@sun.com> I have tested this and verified the 2 leaks are gone. all.sh still passes. I'm not 100% sure that my change in getPQseed is correct . The code was previously freeing and re...

superreview granted: [Bug 294274] [FIX]Memory leak if content sink appends script to node not in document : [Attachment 183695] Patch that fixes the XML leaks
Peter Van der Beken <peterv@propagandism.org> has granted Boris Zbarsky (gone June 3 -- June 30) <bzbarsky@mit.edu>'s request for superreview: Bug 294274: [FIX]Memory leak if content sink appends script to node not in document https://bugzilla.mozilla.org/show_bug.cgi?id=294274 Attachment 183695: Patch that fixes the XML leaks https://bugzilla.mozilla.org/attachment.cgi?id=183695&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> As discussed, let's split off the transformiix stuff. ...

superreview granted: [Bug 305017] Memory Leak: myspell object gets leaked : [Attachment 192990] the fix
David Bienvenu <bienvenu@nventure.com> has granted Scott MacGregor <mscott@mozilla.org>'s request for superreview: Bug 305017: Memory Leak: myspell object gets leaked https://bugzilla.mozilla.org/show_bug.cgi?id=305017 Attachment 192990: the fix https://bugzilla.mozilla.org/attachment.cgi?id=192990&action=edit ...

superreview granted: [Bug 289897] huge memory leak when klipper is running : [Attachment 218749] fix leak
Darin Fisher (Google) <darin@meer.net> has granted superreview: Bug 289897: huge memory leak when klipper is running https://bugzilla.mozilla.org/show_bug.cgi?id=289897 Attachment 218749: fix leak https://bugzilla.mozilla.org/attachment.cgi?id=218749&action=edit ------- Additional Comments from Darin Fisher (Google) <darin@meer.net> r+sr=darin hit the branches too! (a=darin on behalf of drivers) ...

superreview requested: [Bug 429230] memory leak in pkix_CheckCert function : [Attachment 315876] Patch v1(remove debug code that leaks memory)
Alexei Volkov <alexei.volkov.bugs@sun.com> has asked Kai Engert (:kaie) <kengert@redhat.com> for superreview: Bug 429230: memory leak in pkix_CheckCert function https://bugzilla.mozilla.org/show_bug.cgi?id=429230 Attachment 315876: Patch v1(remove debug code that leaks memory) https://bugzilla.mozilla.org/attachment.cgi?id=315876&action=edit ------- Additional Comments from Alexei Volkov <alexei.volkov.bugs@sun.com> Nominating the bug for 3.12.0. checkerCheck(a pointer to pkix_PolicyChecker_Check) will throw an error in case when cert does not pass the che...

superreview granted: [Bug 212269] Memory leak on continuous reloading : [Attachment 127484] fix DOM Style leak
Boris Zbarsky <bzbarsky@mit.edu> has granted David Baron <dbaron@dbaron.org>'s request for superreview: Bug 212269: Memory leak on continuous reloading http://bugzilla.mozilla.org/show_bug.cgi?id=212269 Attachment 127484: fix DOM Style leak http://bugzilla.mozilla.org/attachment.cgi?id=127484&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> Excellent. ...

superreview granted: [Bug 297592] Need a JSS Selfserv test for checking memory leaks : [Attachment 189371] JSS_SelfServServer and JSS_SelfServClient program for testing memory leaks
glen beasley <glen.beasley@sun.com> has granted Sandeep Konchady <Sandeep.Konchady@Sun.COM>'s request for superreview: Bug 297592: Need a JSS Selfserv test for checking memory leaks https://bugzilla.mozilla.org/show_bug.cgi?id=297592 Attachment 189371: JSS_SelfServServer and JSS_SelfServClient program for testing memory leaks https://bugzilla.mozilla.org/attachment.cgi?id=189371&action=edit ...

superreview granted: [Bug 262758] live bookmarks leak memory/RDF resources : [Attachment 161801] 262758-livemark-refresh-leaks-memory-0.patch
Mike Shaver <shaver@mozilla.org> has granted vladimir@pobox.com's request for superreview: Bug 262758: live bookmarks leak memory/RDF resources https://bugzilla.mozilla.org/show_bug.cgi?id=262758 Attachment 161801: 262758-livemark-refresh-leaks-memory-0.patch https://bugzilla.mozilla.org/attachment.cgi?id=161801&action=edit ...

superreview granted: [Bug 228561] mailnews backend has a few memory leaks : [Attachment 137458] proposed fix
Scott MacGregor <mscott@mozilla.org> has granted David Bienvenu <bienvenu@nventure.com>'s request for superreview: Bug 228561: mailnews backend has a few memory leaks http://bugzilla.mozilla.org/show_bug.cgi?id=228561 Attachment 137458: proposed fix http://bugzilla.mozilla.org/attachment.cgi?id=137458&action=edit ...

Web resources about - superreview granted: [Bug 431414] Review MailNews uses of idl functions that return xpcom allocated arrays [..., array, ...] for memory leaks : [Attachment 318566] Fix memory leaks - mozilla.dev.super-review

Resources last updated: 12/26/2015 6:30:00 PM