From 62c35ef9c63b675c1e0c99aa80f4da2f3f1e687c Mon Sep 17 00:00:00 2001 From: Alexandre Rossi Date: Tue, 25 Jul 2023 07:49:03 +0200 Subject: [PATCH] fix use after free when DEBUG --- core/offload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/offload.c b/core/offload.c index 09f948bd07..71dbe9ec34 100644 --- a/core/offload.c +++ b/core/offload.c @@ -236,11 +236,11 @@ static void uwsgi_offload_close(struct uwsgi_thread *ut, struct uwsgi_offload_re close(uor->pipe[0]); } - free(uor); - #ifdef UWSGI_DEBUG uwsgi_log("[offload] destroyed session %p\n", uor); #endif + + free(uor); } static void uwsgi_offload_append(struct uwsgi_thread *ut, struct uwsgi_offload_request *uor) {