Skip to content
Snippets Groups Projects
Commit e035cada authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix memory leak

parent 08d297e3
No related branches found
No related tags found
No related merge requests found
...@@ -439,6 +439,7 @@ void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, ...@@ -439,6 +439,7 @@ void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx,
grpc_buffer_pool *buffer_pool) { grpc_buffer_pool *buffer_pool) {
if (gpr_unref(&buffer_pool->refs)) { if (gpr_unref(&buffer_pool->refs)) {
grpc_combiner_destroy(exec_ctx, buffer_pool->combiner); grpc_combiner_destroy(exec_ctx, buffer_pool->combiner);
gpr_free(buffer_pool->name);
gpr_free(buffer_pool); gpr_free(buffer_pool);
} }
} }
...@@ -563,6 +564,7 @@ void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, ...@@ -563,6 +564,7 @@ void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx,
#endif #endif
grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool);
gpr_mu_destroy(&buffer_user->mu); gpr_mu_destroy(&buffer_user->mu);
gpr_free(buffer_user->name);
} }
void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment