Closed Bug 82524 Opened 24 years ago Closed 24 years ago

Memory leak in nsMsgNewsFolder::SetCachedNewsrcLine

Categories

(MailNews Core :: Networking: NNTP, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 66867

People

(Reporter: bratell, Assigned: sspitzer)

Details

(Keywords: memory-leak)

nsMsgNewsFolder::SetCachedNewsrcLine(const char *newsrcLine) doesn't check if mCachedNewsrcLine already has a value which it might have. It has when called with the stack: nsMsgNewsFolder::SetCachedNewsrcLine(...) line 1554 nsMsgNewsFolder::UpdateSummaryFromNNTPInfo(...) line 872 + 25 bytes nsNntpIncomingServer::DisplaySubscribedGroup(...) line 663 + 24 bytes Patch: if (!newsrcLine) return NS_ERROR_NULL_POINTER; + PR_FREEIF(mCachedNewsrcLine); mCachedNewsrcLine = nsCRT::strdup(newsrcLine); if (!mCachedNewsrcLine) return NS_ERROR_OUT_OF_MEMORY; return NS_OK;
Keywords: mlk, mozilla0.9.2
I believe this is a duplicate of bug 66867 which already has a fix attached.
I'm sure it is. Duplicating. *** This bug has been marked as a duplicate of 66867 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Yes, a dup.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.