Closed
Bug 112287
Opened 23 years ago
Closed 23 years ago
MLK: leaking url in mime when forwarding inline
Categories
(MailNews Core :: MIME, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: naving, Assigned: naving)
Details
(Keywords: memory-leak)
Attachments
(1 file)
3.65 KB,
patch
|
bugzilla
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
[W] MLK: Memory leak of 164 bytes from 1 block allocated in
nsStandardURLConstructor
Distribution of leaked blocks
Allocation location
new(UINT) [new.cpp:23]
nsStandardURLConstructor [nsNetModule.cpp:134]
nsGenericFactory::CreateInstance(nsISupports *,nsID const&,void
* *) [nsGenericFactory.cpp:74]
nsComponentManagerImpl::CreateInstance(nsID const&,nsISupports
*,nsID const&,void * *) [nsComponentManager.cpp:1559]
nsComponentManager::CreateInstance(nsID const&,nsISupports
*,nsID const&,void * *) [nsComponentManager.cpp:3330]
nsFileProtocolHandler::NewURI(char const*,nsIURI *,nsIURI * *)
[nsFileProtocolHandler.cpp:134]
nsIOService::NewURI(char const*,nsIURI *,nsIURI * *)
[nsIOService.cpp:745]
}
if (NS_FAILED(rv)) return rv;
=> return handler->NewURI(aSpec, base, result);
}
nsMimeNewURI [mimemoz2.cpp:631]
if (NS_FAILED(res))
return NS_ERROR_FACTORY_NOT_REGISTERED;
=> return pService->NewURI(aSpec, aBase, aInstancePtrResult);
}
extern "C" nsresult
mime_decompose_file_init_fn(void *,MimeHeaders *)
[mimedrft.cpp:1850]
if (tmpSpec)
{
nsFileURL fileURL(*tmpSpec);
=> const char * tempSpecStr = fileURL.GetURLString();
nsMimeNewURI(&(newAttachment->orig_url), tempSpecStr,
nsnull);
NS_IF_ADDREF(newAttachment->orig_url);
MimeMessage_add_child [mimemsg.cpp:603]
int status = 0;
status = parent->options->decompose_file_init_fn (
parent->options->stream_closure,
=>
((MimeMessage*)parent)->hdrs );
if ( status < 0 ) return status;
}
#endif /* MIME_DRAFTS */
Assignee | ||
Updated•23 years ago
|
QA Contact: esther → stephend
Summary: leaking url in mime when forwarding inline → MLK: leaking url in mime when forwarding inline
Assignee | ||
Comment 1•23 years ago
|
||
use nsCOMPtr to avoid explicit addref and release. here it is being addref'ed
twice.
Assignee | ||
Comment 2•23 years ago
|
||
cc ducarroz and bienvenu for review
Updated•23 years ago
|
Attachment #59446 -
Flags: superreview+
Comment 3•23 years ago
|
||
Comment on attachment 59446 [details] [diff] [review]
proposed fix
+ if (a[i].orig_url)
+ a[i].orig_url=nsnull;
should just be a[i].orig_url=nsnull, no need to check if it's null before.
Also, it seems like there might be tabs in your diff. Fix those things, and
sr=bienvenu
Comment 4•23 years ago
|
||
Comment on attachment 59446 [details] [diff] [review]
proposed fix
don't need to test orig_url before setting it to null (3 occurrences). Appart
that, R=ducarroz
Attachment #59446 -
Flags: review+
Assignee | ||
Comment 5•23 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified FIXED using the latest trunk build on Windows 2000 / Purify.
Status: RESOLVED → VERIFIED
Keywords: mlk
Updated•20 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•