Closed Bug 111368 Opened 24 years ago Closed 24 years ago

[W] MLK: Memory leak of 12 bytes from 1 block allocated in nsMsgComposeAndSend::AddCompFieldLocalAttachments(void)

Categories

(MailNews Core :: Composition, defect, P2)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: naving, Assigned: naving)

Details

Attachments

(1 file)

Distribution of leaked blocks Allocation location new(UINT) [new.cpp:23] nsMsgComposeAndSend::AddCompFieldLocalAttachments(void) [nsMsgSend.cpp:2103] m_attachments[newLoc].mFileSpec->Delete(PR_FALSE); delete (m_attachments[newLoc].mFileSpec); } => m_attachments[newLoc].mFileSpec = new nsFileSpec( nsFileURL(url.get()) ); m_attachments[newLoc].mDeleteFile = PR_FALSE; if (m_attachments[newLoc].mURL) { nsMsgComposeAndSend::HackAttachments(nsMsgAttachmentData const*,nsMsgAttachedFile const*) [nsMsgSend.cpp:2342] nsMsgComposeAndSend::Init(nsIMsgIdentity *,nsMsgCompFields *,nsFileSpec *,int,int,int,nsIMsgDBHdr *,char const*,char const*,UINT,nsMsgAttachmentData const*,nsMsgAttachedFile const*,char const*) [nsMsgSend.cpp:2949] nsMsgComposeAndSend::CreateAndSendMessage(nsIEditorShell *,nsIMsgIdentity *,nsIMsgCompFields *,int,int,int,nsIMsgDBHdr *,char const*,char const*,UINT,nsMsgAttachmentData const*,nsMsgAttachedFile const*,void *,nsIDOMWindowInternal *,nsIMsgProgress *,nsIMs [nsMsgSend.cpp:3699] nsMsgCompose::_SendMsg(int,nsIMsgIdentity *,int) [nsMsgCompose.cpp:874] nsMsgCompose::SendMsg(int,nsIMsgIdentity *,nsIMsgProgress *) [nsMsgCompose.cpp:980] XPTC_InvokeByIndex [xptcinvoke.cpp:152] XPCWrappedNative::CallMethod(XPCCallContext&,CallMode::XPCWrappedNative) [xpcwrappednative.cpp:2009] XPC_WN_CallMethod(JSContext *,JSObject *,UINT,long *,long *) [xpcwrappednativejsops.cpp:1266]
Attached patch proposed fixSplinter Review
delete mFileSpec in the destructor.
cc bienvenu for review
QA Contact: sheelar → stephend
david, need review here too, tia.
Comment on attachment 58822 [details] [diff] [review] proposed fix r=bienvenu, as long as no one else is holding a reference to the file spec
Attachment #58822 - Flags: review+
cc ducarroz for review.
JF, could you review this.
Status: NEW → ASSIGNED
Keywords: nsbeta1+
Priority: -- → P2
Target Milestone: --- → mozilla0.9.8
Comment on attachment 58822 [details] [diff] [review] proposed fix Seems to be the right thing to do. R=ducarroz. Bump David's review to SR=bienvenu
Attachment #58822 - Flags: superreview+
Comment on attachment 58822 [details] [diff] [review] proposed fix Seems to be the right thing to do. R=ducarroz. Bump David's review to SR=bienvenu
Target Milestone: mozilla0.9.8 → mozilla0.9.9
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified FIXED with the latest tip build running Purify on Win2k.
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: