mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
r =scottip, a = mscott Fix for bug #50886. Fix memory leaks in two places when
GetPrimaryEmail() is called.
This commit is contained in:
parent
2ba2ea10f3
commit
210fb6bf79
@ -1926,6 +1926,7 @@ nsresult nsAddrDatabase::AddListAttributeColumnsToRow(nsIAbDirectory *list, nsIM
|
||||
PRInt32 emailLength = nsCRT::strlen(email);
|
||||
if (email && emailLength)
|
||||
total++;
|
||||
PR_FREEIF(email);
|
||||
}
|
||||
SetListAddressTotal(listRow, total);
|
||||
|
||||
@ -1948,6 +1949,7 @@ nsresult nsAddrDatabase::AddListAttributeColumnsToRow(nsIAbDirectory *list, nsIM
|
||||
if (pNewCard)
|
||||
pAddressLists->ReplaceElementAt(pNewCard, i);
|
||||
}
|
||||
PR_FREEIF(email);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user