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:
parent
cd57ee7ffa
commit
bf8c871e26
|
@ -150,6 +150,7 @@ void startup_logs_free(struct ring *r)
|
||||||
munmap(ring_allocated_area(r), STARTUP_LOG_SIZE);
|
munmap(ring_allocated_area(r), STARTUP_LOG_SIZE);
|
||||||
#endif /* ! USE_SHM_OPEN */
|
#endif /* ! USE_SHM_OPEN */
|
||||||
ring_free(r);
|
ring_free(r);
|
||||||
|
startup_logs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* duplicate a startup logs which was previously allocated in a shm */
|
/* duplicate a startup logs which was previously allocated in a shm */
|
||||||
|
|
Loading…
Reference in New Issue