r =scottip, a = mscott Fix for bug #50886. Fix memory leaks in two places when

GetPrimaryEmail() is called.
This commit is contained in:
naving%netscape.com 2000-10-13 23:13:42 +00:00
parent 2ba2ea10f3
commit 210fb6bf79

View File

@ -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;