Fixed memory leak in Buffer construction

pull/3341/head
murgatroid99 10 years ago
parent 474f53b138
commit 640325e65e
  1. 2
      src/node/ext/byte_buffer.cc

@ -77,7 +77,7 @@ Handle<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) {
memcpy(result + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next));
offset += GPR_SLICE_LENGTH(next);
}
return NanEscapeScope(MakeFastBuffer(NanNewBufferHandle(result, length)));
return NanEscapeScope(MakeFastBuffer(NanBufferUse(result, length)));
}
Handle<Value> MakeFastBuffer(Handle<Value> slowBuffer) {

Loading…
Cancel
Save