Revision: 25003
Author: [email protected]
Date: Thu Oct 30 07:41:09 2014 UTC
Log: Changed free(buffer) to delete [] buffer.
This bug (mismatch between new[] and free) was found by running VC++'s
/analyze on all of Chrome.
BUG=chromium:427616
LOG=N
[email protected]
Review URL: https://codereview.chromium.org/686193004
Patch from Bruce Dawson <[email protected]>.
https://code.google.com/p/v8/source/detail?r=25003
Modified:
/branches/bleeding_edge/src/objects-printer.cc
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Fri Oct 24 12:36:45 2014
UTC
+++ /branches/bleeding_edge/src/objects-printer.cc Thu Oct 30 07:41:09 2014
UTC
@@ -595,7 +595,7 @@
// Static so that subsequent calls frees previously allocated space.
// This also means that previous results will be overwritten.
static char* buffer = NULL;
- if (buffer != NULL) free(buffer);
+ if (buffer != NULL) delete[] buffer;
buffer = new char[length()+1];
WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length());
buffer[length()] = 0;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.