Closed Bug 95291 Opened 23 years ago Closed 23 years ago

MLK: Memory leak of 48 bytes from 4 blocks allocated in nsImapMailFolder::GetPath(nsIFileSpec * *)

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: naving, Assigned: naving)

Details

Attachments

(2 files)

Distribution of leaked blocks 48 bytes from 4 blocks of 12 bytes (first block: 
0x14d38670) 
        Allocation location
            new(UINT)+0xc        [new.cpp:23 ip=0x002da05c]
            nsImapMailFolder::GetPath(nsIFileSpec * *)+0x4e 
[nsImapMailFolder.cpp:4377 ip=0x099fb19e]
            nsImapMailFolder::GetSubFolders(nsIEnumerator * *)+0x122 
[nsImapMailFolder.cpp:483 ip=0x099d85d2]
            nsMsgFolderDataSource::createFolderChildNode(nsIMsgFolder 
*,nsIRDFNode * *)+0xbe [nsMsgFolderDataSource.cpp:1694 ip=0x0955678e]
            nsMsgFolderDataSource::createFolderNode(nsIMsgFolder 
*,nsIRDFResource *,nsIRDFNode * *)+0x974 [nsMsgFolderDataSource.cpp:986 
ip=0x09551ad4]
            nsMsgFolderDataSource::GetTarget(nsIRDFResource *,nsIRDFResource 
*,int,nsIRDFNode * *)+0x111 [nsMsgFolderDataSource.cpp:332 ip=0x0954c971]
            CompositeDataSourceImpl::GetTarget(nsIRDFResource *,nsIRDFResource 
*,int,nsIRDFNode * *)+0x2e9 [nsCompositeDataSource.cpp:816 ip=0x0a453c69]
            nsXULTemplateBuilder::CheckContainer(nsIRDFResource *,int *,int 
*)+0x2e2 [nsXULTemplateBuilder.cpp:1299 ip=0x0565bf64]
            nsXULContentBuilder::BuildContentFromTemplate(nsIContent 
*,nsIContent *,nsIContent *,int,nsIRDFResource *,int,nsTemplateMatch 
*,nsIContent * *,int *)+0x1e3b [nsXULContentBuilder.cpp:655 ip=0x05625dfb]
            nsXULContentBuilder::BuildContentFromTemplate(nsIContent 
*,nsIContent *,nsIContent *,int,nsIRDFResource *,int,nsTemplateMatch 
*,nsIContent * *,int *)+0x14f1 [nsXULContentBuilder.cpp:597 ip=0x056254b1]
Attached patch proposed fixSplinter Review
free the memory in the destructor. cc bienvenu for review. 
r=hwaara
you don't need to check if a pointer is null before deleting it.
Attached patch patchSplinter Review
sr=bienvenu
fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
OS: Windows NT → All
QA Contact: esther → stephend
Hardware: PC → All
Verified FIXED.  If we have a null m_pathName, then we just delete that object.
Used LXR (purify is currently broken).  Naving got this from a Purify log I had,
next time I run purify I'll log the leaks I see, so we'll catch this if it
regresses again with any new code.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: