Prevent a NULL deref.

Patch by Rachel Blum <groby@chromium.org>

R=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/7218036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mikhail.naganov@gmail.com 2011-06-22 20:41:02 +00:00
parent 0a12f5dcf8
commit 0416b2edc4

View File

@ -396,8 +396,10 @@ class Logger::NameMap {
void Remove(Address code_address) {
HashMap::Entry* entry = FindEntry(code_address);
if (entry != NULL) DeleteArray(static_cast<const char*>(entry->value));
RemoveEntry(entry);
if (entry != NULL) {
DeleteArray(static_cast<char*>(entry->value));
RemoveEntry(entry);
}
}
void Move(Address from, Address to) {