Fix bug 445999, nsCStringArray::operator= leaks all strings that were in the destination array. r=bsmedberg

This commit is contained in:
Jesse Ruderman 2008-09-10 15:02:06 -07:00
parent d26b55df8b
commit 79639ae449

View File

@ -732,6 +732,9 @@ nsStringArray::~nsStringArray(void)
nsStringArray&
nsStringArray::operator=(const nsStringArray& other)
{
// Free our strings
Clear();
// Copy the pointers
nsVoidArray::operator=(other);
@ -982,6 +985,9 @@ nsCStringArray::~nsCStringArray(void)
nsCStringArray&
nsCStringArray::operator=(const nsCStringArray& other)
{
// Free our strings
Clear();
// Copy the pointers
nsVoidArray::operator=(other);