Closed
Bug 175180
Opened 22 years ago
Closed 19 years ago
Probable memory leak in nsDirectoryDataSource.cpp
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect)
SeaMonkey
MailNews: Address Book & Contacts
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 235461
People
(Reporter: bzbarsky, Unassigned)
Details
http://lxr.mozilla.org/seamonkey/source/mailnews/addrbook/src/nsDirectoryDataSource.cpp#584
(in nsAbDirectoryDataSource::createDirectoryChildNode) has the following code:
584 for (i = 0; i < total; i++)
585 {
586 nsCOMPtr<nsISupports> mailList =
getter_AddRefs(pAddressLists->ElementAt(i));
587 if (mailList)
588 mailList->QueryInterface(NS_GET_IID(nsIRDFResource), (void**)target);
589 else
590 return NS_RDF_NO_VALUE;
591 }
592 return NS_OK;
This leaks if total > 1. I don't know whether it ever is, but if it is you may
want to |return CallQueryInterface(mailList, target);| instead of what you're
doing....
If total <= 1 always, you need an assertion to that effect, please.
Updated•20 years ago
|
Product: Browser → Seamonkey
Updated•20 years ago
|
Assignee: sspitzer → mail
Comment 2•19 years ago
|
||
Looks like this was fixed by bug 235461, therefore duping.
*** This bug has been marked as a duplicate of 235461 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•