summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 20:30:06 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 20:30:06 +0000
commit37cbdcc9964ad7b3af8a5420fdbaebe67d11a60c (patch)
tree0cc09a4f1aadc587b282e8b0a2f0f57d9e736a4b /chrome
parent29b6d7f734c5801178c46b4f8ee48e03309fdc95 (diff)
downloadchromium_src-37cbdcc9964ad7b3af8a5420fdbaebe67d11a60c.zip
chromium_src-37cbdcc9964ad7b3af8a5420fdbaebe67d11a60c.tar.gz
chromium_src-37cbdcc9964ad7b3af8a5420fdbaebe67d11a60c.tar.bz2
Fix a memory leak in Add to dictionary code.
Review URL: http://codereview.chromium.org/3148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/third_party/hunspell/src/hunspell/hashmgr.cxx5
-rw-r--r--chrome/third_party/hunspell/src/hunspell/hashmgr.hxx1
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/third_party/hunspell/src/hunspell/hashmgr.cxx b/chrome/third_party/hunspell/src/hunspell/hashmgr.cxx
index f1c1355..51c054f 100644
--- a/chrome/third_party/hunspell/src/hunspell/hashmgr.cxx
+++ b/chrome/third_party/hunspell/src/hunspell/hashmgr.cxx
@@ -121,6 +121,11 @@ HashMgr::~HashMgr()
#ifdef HUNSPELL_CHROME_CLIENT
EmptyHentryCache();
+ STLDeleteValues(&custom_word_to_hentry_map_);
+ for (std::vector<std::string*>::iterator it = pointer_to_strings_.begin();
+ it != pointer_to_strings_.end(); ++it) {
+ delete *it;
+ }
#endif
}
diff --git a/chrome/third_party/hunspell/src/hunspell/hashmgr.hxx b/chrome/third_party/hunspell/src/hunspell/hashmgr.hxx
index f247f80..4f60646 100644
--- a/chrome/third_party/hunspell/src/hunspell/hashmgr.hxx
+++ b/chrome/third_party/hunspell/src/hunspell/hashmgr.hxx
@@ -5,6 +5,7 @@
#include "htypes.hxx"
#ifdef HUNSPELL_CHROME_CLIENT
+#include "chrome/common/stl_util-inl.h"
#include "chrome/third_party/hunspell/google/bdict_reader.h"
#include "base/string_piece.h"
#include <string>