Skip to content

Commit

Permalink
Fixes memory leak when receiving data
Browse files Browse the repository at this point in the history
  • Loading branch information
Seongjin Cho committed Dec 1, 2015
1 parent 8b77d61 commit 5c3d571
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node/ext/byte_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Local<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) {
while (grpc_byte_buffer_reader_next(&reader, &next) != 0) {
memcpy(result + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next));
offset += GPR_SLICE_LENGTH(next);
gpr_slice_unref(next);
}
return scope.Escape(MakeFastBuffer(
Nan::NewBuffer(result, length).ToLocalChecked()));
Expand Down

0 comments on commit 5c3d571

Please sign in to comment.