mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix bug 445999, nsCStringArray::operator= leaks all strings that were in the destination array. r=bsmedberg
This commit is contained in:
parent
d26b55df8b
commit
79639ae449
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user