Reviewers: jochen,

Description:
Free memory in the mock array buffer allocator.

Turns out ASAN and valgrind notice if you leak 0 allocated bytes.

[email protected]

Please review this at https://codereview.chromium.org/306583006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -1 lines):
  M src/d8.cc


Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index f7d63ce1cd18c7eae9311fb50def7516232a80f2..d12d8c8e72b9d87e910304101c41ea6d7c2847c7 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1471,7 +1471,8 @@ class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
   virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE {
     return malloc(0);
   }
-  virtual void Free(void*, size_t) V8_OVERRIDE {
+  virtual void Free(void* p, size_t) V8_OVERRIDE {
+    free(p);
   }
 };



--
--
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.

Reply via email to