Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: src/log.cc

Issue 7218036: Prevent a NULL deref (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
===================================================================
--- src/log.cc (revision 8294)
+++ src/log.cc (working copy)
@@ -400,8 +400,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<const char*>(entry->value));
mnaganov (inactive) 2011/06/22 05:02:47 We allocate an array of char, why do we cast to co
groby-ooo-7-16 2011/06/22 17:17:26 Presumably because DeleteArray takes a pointer to
mnaganov (inactive) 2011/06/22 18:54:23 I mean that a name string is allocated like this:
+ RemoveEntry(entry);
+ }
}
void Move(Address from, Address to) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698