Closed
Bug 112342
Opened 23 years ago
Closed 23 years ago
Memory leak of 23 bytes from 1 block allocated in MimeHeaders_get_name
Categories
(MailNews Core :: MIME, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stephend, Assigned: naving)
References
()
Details
(Keywords: memory-leak)
Attachments
(1 file)
528 bytes,
patch
|
bugzilla
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Build: Latest trunk pull @8:45 pm using Windows 2000 / Purify.
Summary: Memory leak of 23 bytes from 1 block allocated in MimeHeaders_get_name
Steps to Reproduce: Reading an inline JPG attachment around 180 lines inside a
newsgroup, I get:
[W] MLK: Memory leak of 23 bytes from 1 block allocated in PR_Malloc
Distribution of leaked blocks
Allocation location
malloc [msvcrt.DLL]
PR_Malloc [prmem.c:50]
MimeHeaders_get_name(MimeHeaders *,MimeDisplayOptions *) [mimehdrs.cpp:875]
s = MimeHeaders_get(hdrs, HEADER_CONTENT_DISPOSITION, PR_FALSE, PR_FALSE);
if (s)
{
=> name = MimeHeaders_get_parameter(s, HEADER_PARM_FILENAME, &charset,
NULL);
PR_Free(s);
}
MimeInlineImage_parse_begin [mimeiimg.cpp:132]
nsCAutoString url_with_filename(image_url);
url_with_filename += "&type=";
url_with_filename += ct;
=> char * filename = MimeHeaders_get_name ( obj->headers, obj->options );
if (filename)
{
char *escapedName = nsEscape(filename, url_Path);
MimeUntypedText_open_subpart [mimeunty.cpp:369]
}
/* And start its parser going. */
=> status = uty->open_subpart->clazz->parse_begin(uty->open_subpart);
if (status < 0)
{
/* MimeContainer->finalize will take care of shutting it down now. */
MimeUntypedText_parse_line [mimeunty.cpp:150]
status = MimeUntypedText_open_subpart (obj,
MimeUntypedTextSubpartTypeUUE,
type, ENCODING_UUENCODE,
=> name, NULL);
PR_FREEIF(name);
PR_FREEIF(type);
if (status < 0) return status;
convert_and_send_buffer [mimebuf.cpp:168]
}
#endif
=> return (*per_line_fn)(buf, length, closure);
}
extern "C" int
mime_LineBuffer [mimebuf.cpp:255]
status = convert_and_send_buffer(*bufferP, *buffer_fpP,
convert_newlines_p,
=> per_line_fn, closure);
if (status < 0)
return status;
MimeObject_parse_buffer [mimeobj.cpp:255]
((int (*PR_CALLBACK) (char *, PRInt32, void *))
/* This cast is to turn void into MimeObject */
obj->clazz->parse_line),
=> obj);
}
convert_and_send_buffer [mimebuf.cpp:168]
}
#endif
=> return (*per_line_fn)(buf, length, closure);
}
extern "C" int
mime_LineBuffer [mimebuf.cpp:255]
status = convert_and_send_buffer(*bufferP, *buffer_fpP,
convert_newlines_p,
=> per_line_fn, closure);
if (status < 0)
return status;
MimeObject_parse_buffer [mimeobj.cpp:255]
((int (*PR_CALLBACK) (char *, PRInt32, void *))
/* This cast is to turn void into MimeObject
*/
obj->clazz->parse_line),
=> obj);
}
nsStreamConverter::OnDataAvailable(nsIRequest *,nsISupports
*,nsIInputStream *,UINT,UINT) [nsStreamConverter.cpp:919]
else if (mBridgeStream)
{
nsMIMESession *tSession = (nsMIMESession *) mBridgeStream;
=> rc = tSession->put_block((nsMIMESession *)mBridgeStream, buf,
readLen);
}
PR_FREEIF(buf);
nsDocumentOpenInfo::OnDataAvailable(nsIRequest *,nsISupports
*,nsIInputStream *,UINT,UINT) [nsURILoader.cpp:240]
nsNntpCacheStreamListener::OnDataAvailable(nsIRequest *,nsISupports
*,nsIInputStream *,UINT,UINT) [nsNNTPProtocol.cpp:747]
nsStorageTransport::nsReadRequest::OnDataAvailable(nsIRequest *,nsISupports
*,nsIInputStream *,UINT,UINT) [nsStorageTransport.cpp:625]
XPTC_InvokeByIndex [xptcinvoke.cpp:152]
EventHandler [nsProxyEvent.cpp:514]
md_EventReceiverProc [plevent.c:1071]
ScrollDC [user32.dll]
Reporter | ||
Comment 1•23 years ago
|
||
See my test post at news://news.mcom.com/netscape.public.test
entitled, "Testing leaks, ignore this". Man, I sure hope this isnt' a DUP.
Keywords: mlk
Reporter | ||
Updated•23 years ago
|
QA Contact: esther → stephend
Reporter | ||
Comment 3•23 years ago
|
||
Sorry, it's news://news.mozilla.org/netscape.public.test
Assignee | ||
Comment 4•23 years ago
|
||
free filename. please review.
Comment 5•23 years ago
|
||
Comment on attachment 59588 [details] [diff] [review]
proposed fix
R=ducarroz
Attachment #59588 -
Flags: review+
Assignee | ||
Comment 6•23 years ago
|
||
david, looking for sr.
Comment 7•23 years ago
|
||
Comment on attachment 59588 [details] [diff] [review]
proposed fix
sr=bienvenu
Attachment #59588 -
Flags: superreview+
Assignee | ||
Comment 8•23 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•23 years ago
|
||
Verified FIXED... latest trunk Win32 build using Purify.
Status: RESOLVED → VERIFIED
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
•