Revision: 8384
Author:   [email protected]
Date:     Wed Jun 22 13:41:02 2011
Log:      Prevent a NULL deref.

Patch by Rachel Blum <[email protected]>

[email protected]

Review URL: http://codereview.chromium.org/7218036
http://code.google.com/p/v8/source/detail?r=8384

Modified:
 /branches/bleeding_edge/src/log.cc

=======================================
--- /branches/bleeding_edge/src/log.cc  Wed Jun 22 06:54:35 2011
+++ /branches/bleeding_edge/src/log.cc  Wed Jun 22 13:41:02 2011
@@ -396,8 +396,10 @@

   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) {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to