From 39cb0d47f3c02f17b5db077e070b8afbf3b0ee07 Mon Sep 17 00:00:00 2001 From: "db48x%yahoo.com" Date: Sat, 11 Jun 2005 07:33:05 +0000 Subject: [PATCH] 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 --- mozilla/toolkit/components/satchel/src/nsFormHistory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp b/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp index ff1c24e1098..83885869076 100644 --- a/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp +++ b/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp @@ -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;