Closed Bug 240670 Opened 21 years ago Closed 21 years ago

memory leak in MIME_DecodeMimeHeader [

Categories

(MailNews Core :: MIME, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Details

(Keywords: memory-leak)

Attachments

(1 file)

I think the new string handling stuff in mailnews caused this leak (just a guess). I have a fix, here's the leak. [W] MLK: Memory leak of 3231 bytes from 40 blocks allocated in PL_strdup [PLC4.DLL] Distribution of leaked blocks Allocation location malloc [dbgheap.c:129] PL_strdup [strdup.c:46] nsCRT::strdup(char const*) [nsCRT.h:172] MIME_DecodeMimeHeader [comi18n.cpp:737] rv = mimehdrpar->DecodeRFC2047Header(header, default_charset, override_charset, eatContinuations, result); if (NS_SUCCEEDED(rv)) => return nsCRT::strdup(result.get()); return nsnull; } MimeHeaders_convert_header_value [mimehdrs.cpp:74] if (opt && opt->rfc1522_conversion_p) { converted = MIME_DecodeMimeHeader(value.get(), opt->default_charset, => opt->override_charset, PR_TRUE); if (converted) { MimeHeaders_write_all_headers(MimeHeaders *,MimeDisplayOptions *,int) [mimehdrs.cpp:595]
Attached patch proposed fixSplinter Review
Attachment #146246 - Flags: superreview?(mscott)
Attachment #146246 - Flags: review?(jshin)
Attachment #146246 - Flags: superreview?(mscott) → superreview+
Comment on attachment 146246 [details] [diff] [review] proposed fix r=jshin sorry for the leak and thanks for the fix.
Attachment #146246 - Flags: review?(jshin) → review+
fix checked in, np.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
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

Created:
Updated:
Size: