bug 289695: nsFormHistory.cpp, nsAutoVoidArray should call PR_Free on matchingValues, and not delete it.
r=mconnor, a=asa git-svn-id: svn://10.0.0.236/trunk@174466 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsCOMArray.h"
|
||||
|
||||
#include "prmem.h" //for Bug 289695
|
||||
|
||||
#define PREF_FORMFILL_BRANCH "browser.formfill."
|
||||
#define PREF_FORMFILL_ENABLE "enable"
|
||||
|
||||
@@ -787,7 +789,7 @@ nsFormHistory::AutoCompleteSearch(const nsAString &aInputName,
|
||||
result->AddRow(matchingRows[items[i]]);
|
||||
|
||||
// Free up these strings we owned.
|
||||
delete (PRUnichar *) matchingValues[i];
|
||||
PR_Free((PRUnichar *) matchingValues[i]);
|
||||
}
|
||||
|
||||
delete[] items;
|
||||
|
||||
Reference in New Issue
Block a user