From: Valentine Krasnobaeva Date: Mon, 28 Oct 2024 15:03:44 +0000 (+0100) Subject: BUG/MINOR: errors: startup_logs_free: set global startup_logs ptr to NULL X-Git-Tag: v3.1-dev11~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf8c871e26c226a7c0bdbf6afe9a9bd8398c4f5d;p=thirdparty%2Fhaproxy.git BUG/MINOR: errors: startup_logs_free: set global startup_logs ptr to NULL ring_free() calls free() on the ring struct pointer, but startup_logs continues to keep this address. So let's reset at the end startup_logs to NULL. startup_logs is checked in print_message(). No need to backport this fix, as it's related to the latest master-worker refactoring. --- diff --git a/src/errors.c b/src/errors.c index 26e5fa0ab6..201eece57b 100644 --- a/src/errors.c +++ b/src/errors.c @@ -150,6 +150,7 @@ void startup_logs_free(struct ring *r) munmap(ring_allocated_area(r), STARTUP_LOG_SIZE); #endif /* ! USE_SHM_OPEN */ ring_free(r); + startup_logs = NULL; } /* duplicate a startup logs which was previously allocated in a shm */