aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-07-31 10:25:12 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-07-31 10:25:12 -0700
commit6a8355de45efefb4cad388dfb639a8713e66de57 (patch)
treecf4eeeea307847ab6b5eddb4e0a9f7683ed85449 /src/objective-c
parent433f7bce2d5a6683e9d60a147b528bb9be98baff (diff)
Fix two memory leaks
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/GRPCClient/private/NSData+GRPC.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m
index 7ee76ad333..7c46594dd5 100644
--- a/src/objective-c/GRPCClient/private/NSData+GRPC.m
+++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m
@@ -47,6 +47,8 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer,
grpc_slice_unref(slice);
*array = result;
*length = uncompressed_length;
+
+ grpc_byte_buffer_reader_destroy(&reader);
}
static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,