Merge pull request #6711 from thought-machine/fix_read_leak

Fix memory leak reading from python ByteBuffer.
pull/6725/head
Jan Tattermusch 9 years ago
commit addf007513
  1. 1
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi

@ -274,6 +274,7 @@ cdef class ByteBuffer:
data_slice_length = gpr_slice_length(data_slice)
with gil:
result += (<char *>data_slice_pointer)[:data_slice_length]
gpr_slice_unref(data_slice)
with nogil:
grpc_byte_buffer_reader_destroy(&reader)
return bytes(result)

Loading…
Cancel
Save