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:
db48x%yahoo.com
2005-06-11 07:33:05 +00:00
parent 3f9d2ca418
commit 39cb0d47f3

View File

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