Closed
Bug 181212
Opened 22 years ago
Closed 20 years ago
Probable leak in nsAbDirectoryDataSource::createDirectoryChildNode
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect)
SeaMonkey
MailNews: Address Book & Contacts
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 235461
People
(Reporter: bzbarsky, Assigned: sspitzer)
Details
(Keywords: memory-leak)
See comments in bug 175540. The code in question is:
NS_ASSERTION(total <= 1, "This code probably leaks. Please break out of the
loop or something, ok?");
for (i = 0; i < total; i++)
{
nsCOMPtr<nsIRDFResource> mailList = do_QueryElementAt(pAddressLists, i);
if (mailList)
NS_ADDREF(*target = mailList);
else
return NS_RDF_NO_VALUE;
}
The assertion says it all; this leaks if mailList ever tests true twice in a
single iteration of the loop.
Comment 1•22 years ago
|
||
If you want the last, why not just reverse the loop?
Updated•20 years ago
|
Product: Browser → Seamonkey
It looks like this was fixed by Scott in bug 235461. Suggest duping to that bug
which is resolved fixed. LXR confirms this function was fixed.
![]() |
Reporter | |
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 235461 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•