Open
Bug 112341
Opened 23 years ago
Updated 2 years ago
MLK: Memory leak of 144 bytes from 1 block allocated in PL_strdup
Categories
(MailNews Core :: MIME, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: naving, Unassigned)
References
Details
(Keywords: memory-leak)
Attachments
(1 file)
628 bytes,
patch
|
Details | Diff | Splinter Review |
Again fwding as inline.... Distribution of leaked blocks Allocation location malloc [dbgheap.c:129] PL_strdup [strdup.c:46] nsCRT::strdup(char const*) [nsCRT.h:182] mime_bridge_create_draft_stream [mimedrft.cpp:2016] PR_FREEIF(mdd); return nsnull; } => mdd->options->url = nsCRT::strdup(mdd->url_name); mdd->options->format_out = format_out; // output format mdd->options->decompose_file_p = PR_TRUE; /* new field in MimeDisplayOptions */ bridge_create_stream [nsStreamConverter.cpp:101] { if ( (format_out == nsMimeOutput::nsMimeMessageDraftOrTemplate) || (format_out == nsMimeOutput::nsMimeMessageEditorTemplate) ) => return mime_bridge_create_draft_stream(newEmitter, newPluginObj2, uri, format_out); else return mime_bridge_create_display_stream(newEmitter, newPluginObj2, uri, format_out, whattodo, aChannel); nsStreamConverter::Init(nsIURI *,nsIStreamListener *,nsIChannel *) [nsStreamConverter.cpp:740] return NS_OK; else { => mBridgeStream = bridge_create_stream(mEmitter, this, aURI, newType, whattodo, aChannel); if (!mBridgeStream) return NS_ERROR_OUT_OF_MEMORY; else nsStreamConverter::AsyncConvertData(WORD const*,WORD const*,nsIStreamListener *,nsISupports *) [nsStreamConverter.cpp:1117] nsCOMPtr<nsIURI> aUri; aChannel->GetURI(getter_AddRefs(aUri)); => return Init(aUri, aListener, aChannel); } NS_IMETHODIMP nsStreamConverter::FirePendingStartRequest() nsMsgDraft::ProcessDraftOrTemplateOperation(char const*,int,nsIMsgIdentity *,nsIMsgDBHdr * *,nsIMsgWindow *) [nsMsgCreate.cpp:178] nsCOMPtr<nsIChannel> dummyChannel; rv = NS_NewInputStreamChannel(getter_AddRefs(dummyChannel), aURL, nsnull, nsnull, -1); => if (NS_FAILED(mimeParser->AsyncConvertData(nsnull, nsnull, nsnull, dummyChannel))) { Release(); mMessageService = nsnull; nsMsgDraft::OpenDraftMsg(char const*,nsIMsgDBHdr * *,nsIMsgIdentity *,int,nsIMsgWindow *) [nsMsgCreate.cpp:216] mAddInlineHeaders = addInlineHeaders; return ProcessDraftOrTemplateOperation(msgURI, nsMimeOutput::nsMimeMessageDraftOrTemplate, => identity, aMsgToReplace, aMsgWindow); } nsresult nsMsgComposeService::OpenComposeWindow(char const*,char const*,int,int,nsIMsgIdentity *,nsIMsgWindow *) [nsMsgComposeService.cpp:276] switch(type) { case nsIMsgCompType::ForwardInline: => rv = pMsgDraft->OpenDraftMsg(uriToOpen.get(), nsnull, identity, PR_TRUE, aMsgWindow); break; case nsIMsgCompType::Draft: rv = pMsgDraft->OpenDraftMsg(uriToOpen.get(), nsnull, identity, PR_FALSE, aMsgWindow);
Reporter | ||
Comment 1•23 years ago
|
||
reassigning and cc'ing for reviews for upcoming patch
Reporter | ||
Comment 2•23 years ago
|
||
options->url is const char* and never owns the buffer, it seems to always point to mdd->url_name and I have tested it works.
Reporter | ||
Comment 3•23 years ago
|
||
for example from mimemoz2.cpp:1497
> msd->options->url = msd->url_name;
Comment 4•23 years ago
|
||
you should run under purify. The owner of the string could free it out from under you.
Comment 5•23 years ago
|
||
Comment on attachment 59490 [details] [diff] [review] proposed fix You cannot do that, unless you find a new fix for bug 31207. I know that sound uggly.
Attachment #59490 -
Flags: needs-work+
Updated•23 years ago
|
Status: NEW → ASSIGNED
Updated•20 years ago
|
Product: MailNews → Core
Comment 7•17 years ago
|
||
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Assignee | ||
Updated•16 years ago
|
Product: Core → MailNews Core
Updated•15 years ago
|
Severity: normal → minor
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•