reverse order flist destruction and mempool allocation warning
authorLennart Poettering <lennart@poettering.net>
Thu, 26 Jul 2007 13:20:11 +0000 (13:20 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 Jul 2007 13:20:11 +0000 (13:20 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1543 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulsecore/memblock.c

index c39147d..f3e400e 100644 (file)
@@ -669,12 +669,13 @@ void pa_mempool_free(pa_mempool *p) {
 
     pa_mutex_unlock(p->mutex);
 
+    pa_flist_free(p->free_slots, NULL);
+
     if (pa_atomic_load(&p->stat.n_allocated) > 0) {
 /*         raise(SIGTRAP);  */
         pa_log_warn("WARNING! Memory pool destroyed but not all memory blocks freed! %u remain.", pa_atomic_load(&p->stat.n_allocated));
     }
 
-    pa_flist_free(p->free_slots, NULL);
     pa_shm_free(&p->memory);
 
     pa_mutex_free(p->mutex);