diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 17f8893aadb..8aabd7ab68d 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -263,6 +263,8 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { !bulist_empty(a->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { bpstep_sched(exec_ctx, a->buffer_pool); } + grpc_buffer_pool_internal_unref(exec_ctx, a->buffer_pool); + gpr_free(a); } /******************************************************************************* diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 087d9a167f3..290f328b6b3 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -38,6 +38,10 @@ #include "src/core/lib/iomgr/exec_ctx.h" +grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); +void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, + grpc_buffer_pool *buffer_pool); + typedef enum { GRPC_BULIST_AWAITING_ALLOCATION, GRPC_BULIST_NON_EMPTY_FREE_POOL,