diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index 29abe2b9a2..4f0eeeaeb9 100644 --- a/modules/slotmem/mod_slotmem_shm.c +++ b/modules/slotmem/mod_slotmem_shm.c @@ -281,11 +281,11 @@ static apr_status_t cleanup_slotmem(void *param) if (AP_SLOTMEM_IS_PERSIST(next)) { store_slotmem(next); } + apr_shm_destroy((apr_shm_t *)next->shm); if (next->fbased) { apr_shm_remove(next->name, next->gpool); apr_file_remove(next->name, next->gpool); } - apr_shm_destroy((apr_shm_t *)next->shm); next = next->next; } }