summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_unit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 6a0657c6..7d2bf2c7 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -5023,6 +5023,7 @@ nxt_unit_ctx_free(nxt_unit_ctx_impl_t *ctx_impl)
{
nxt_unit_impl_t *lib;
nxt_unit_mmap_buf_t *mmap_buf;
+ nxt_unit_read_buf_t *rbuf;
nxt_unit_request_info_impl_t *req_impl;
nxt_unit_websocket_frame_impl_t *ws_impl;
@@ -5060,6 +5061,13 @@ nxt_unit_ctx_free(nxt_unit_ctx_impl_t *ctx_impl)
} nxt_queue_loop;
+ nxt_queue_each(rbuf, &ctx_impl->free_rbuf, nxt_unit_read_buf_t, link)
+ {
+ if (rbuf != &ctx_impl->ctx_read_buf) {
+ nxt_unit_free(&ctx_impl->ctx, rbuf);
+ }
+ } nxt_queue_loop;
+
pthread_mutex_destroy(&ctx_impl->mutex);
pthread_mutex_lock(&lib->mutex);