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.
This commit is contained in:
Valentine Krasnobaeva 2024-10-28 16:03:44 +01:00 committed by William Lallemand
parent cd57ee7ffa
commit bf8c871e26
1 changed files with 1 additions and 0 deletions

View File

@ -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 */