Closed
Bug 279278
Opened 20 years ago
Closed 19 years ago
Potential memory leak in nsImapServerResponseParser
Categories
(MailNews Core :: Networking: IMAP, defect)
MailNews Core
Networking: IMAP
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: martin.gerbershagen, Assigned: engel)
References
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
|
3.41 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8a6) Gecko/20050118 Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8a6) Gecko/20050118 In file nsImapServerResponseParser.cpp, line 369 the memory allocated by PL_strdup(currentCommand) is not always deleted. If the right side of the && in the condition if (copyCurrentCommand && !fServerConnection.DeathSignalReceived()) is false, the block is not executed and then the PR_Free(copyCurrentCommand); in line 387 is never called. Reproducible: Always Steps to Reproduce:
| Assignee | ||
Comment 1•20 years ago
|
||
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp&rev=1.118&root=/cvsroot#369
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 2•20 years ago
|
||
Somewhat related, another variable with the same name |copyCurrentCommand| could be freed even if it was null. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp&rev=1.118&root=/cvsroot#208
Summary: Potential memory leak → Potential memory leak in nsImapServerResponseParser
| Assignee | ||
Comment 3•20 years ago
|
||
fixes the two issues mentioned above
Assignee: sspitzer → Hans-A.Engel
Status: NEW → ASSIGNED
| Assignee | ||
Updated•20 years ago
|
Attachment #172035 -
Flags: review?(bienvenu)
| Assignee | ||
Updated•20 years ago
|
Component: MailNews: Account Manager → Networking: IMAP
OS: Solaris → All
Product: Mozilla Application Suite → Core
Hardware: Sun → All
Version: unspecified → Trunk
| Assignee | ||
Updated•19 years ago
|
Attachment #172035 -
Attachment is obsolete: true
| Assignee | ||
Updated•19 years ago
|
Attachment #172035 -
Flags: review?(bienvenu)
| Assignee | ||
Comment 4•19 years ago
|
||
Attachment #195336 -
Flags: review?(bienvenu)
Comment 5•19 years ago
|
||
Comment on attachment 195336 [details] [diff] [review] properly freeing copyCurrentCommand, better patch (checked in) looks good, thx.
Attachment #195336 -
Flags: review?(bienvenu) → review+
| Assignee | ||
Updated•19 years ago
|
Attachment #195336 -
Flags: superreview?(mscott)
Updated•19 years ago
|
Attachment #195336 -
Flags: superreview?(mscott) → superreview?(bienvenu)
Updated•19 years ago
|
Attachment #195336 -
Flags: superreview?(bienvenu) → superreview+
Comment 6•19 years ago
|
||
Comment on attachment 195336 [details] [diff] [review] properly freeing copyCurrentCommand, better patch (checked in) Patch Checked in: /cvsroot/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp,v <-- nsImapServerResponseParser.cpp new revision: 1.126; previous revision: 1.125 done
Attachment #195336 -
Attachment description: properly freeing copyCurrentCommand, better patch → properly freeing copyCurrentCommand, better patch (checked in)
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•