Skip to content
Snippets Groups Projects
Commit 640325e6 authored by murgatroid99's avatar murgatroid99
Browse files

Fixed memory leak in Buffer construction

parent 474f53b1
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ Handle<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) { ...@@ -77,7 +77,7 @@ Handle<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) {
memcpy(result + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); memcpy(result + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next));
offset += 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) { Handle<Value> MakeFastBuffer(Handle<Value> slowBuffer) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment