Skip to content

Commit bf8c871

Browse files
einval22wlallemand
authored andcommitted
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.
1 parent cd57ee7 commit bf8c871

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/errors.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void startup_logs_free(struct ring *r)
150150
munmap(ring_allocated_area(r), STARTUP_LOG_SIZE);
151151
#endif /* ! USE_SHM_OPEN */
152152
ring_free(r);
153+
startup_logs = NULL;
153154
}
154155

155156
/* duplicate a startup logs which was previously allocated in a shm */

0 commit comments

Comments
 (0)