From bf8c871e26c226a7c0bdbf6afe9a9bd8398c4f5d Mon Sep 17 00:00:00 2001 From: Valentine Krasnobaeva Date: Mon, 28 Oct 2024 16:03:44 +0100 Subject: [PATCH] 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. --- src/errors.c | 1 + 1 file changed, 1 insertion(+) 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 */