diff options
author | 2015-02-05 09:47:29 -0800 | |
---|---|---|
committer | 2015-02-05 09:47:29 -0800 | |
commit | 4e54cf5b99453b605758d2fd0ae3cd96078d73ee (patch) | |
tree | 93d39772ceead77eb8b04f9bd7d029e9668cf04c | |
parent | 3f17789fd1752335168666a7ec08007dbe7c3ce1 (diff) |
Fix another leak
-rw-r--r-- | src/core/surface/byte_buffer_queue.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/surface/byte_buffer_queue.c b/src/core/surface/byte_buffer_queue.c index dc280a60c5..2adda8056c 100644 --- a/src/core/surface/byte_buffer_queue.c +++ b/src/core/surface/byte_buffer_queue.c @@ -35,7 +35,13 @@ #include <grpc/support/alloc.h> #include <grpc/support/useful.h> -static void bba_destroy(grpc_bbq_array *array) { gpr_free(array->data); } +static void bba_destroy(grpc_bbq_array *array) { + size_t i; + for (i = 0; i < array->count; i++) { + grpc_byte_buffer_destroy(array->data[i]); + } + gpr_free(array->data); +} /* Append an operation to an array, expanding as needed */ static void bba_push(grpc_bbq_array *a, grpc_byte_buffer *buffer) { |