Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hughes <tom.hughes@palm.com>2010-11-24 19:34:53 +0300
committerRyan Dahl <ry@tinyclouds.org>2010-11-24 23:53:28 +0300
commit6285fac23273c03428c66d023b2c817836fd33bd (patch)
treeebbfe9cb3a09e9f4239c0383c30292ec0de87e3c /src
parent7fcfb7b981f7898cc3c7f7d32573ad0c86f7cddf (diff)
Allocations with new[] must be freed with delete[].
See http://valgrind.org/docs/manual/mc-manual.html#mc-manual.rudefn
Diffstat (limited to 'src')
-rw-r--r--src/node_buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index a042c80896f..ef74b5a4071 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -176,7 +176,7 @@ void Buffer::Replace(char *data, size_t length,
if (callback_) {
callback_(data_, callback_hint_);
} else if (length_) {
- delete data_;
+ delete [] data_;
V8::AdjustAmountOfExternalAllocatedMemory(-(sizeof(Buffer) + length_));
}