From 82c46f223823e8359ee2b788a83eac0ab82c912a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 4 Oct 2008 00:14:02 +0200 Subject: do not cleanup staticly allocated memory unless we are in valgrind mode --- src/pulsecore/flist.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pulsecore/flist.h') diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h index 2d8422f9..512dd357 100644 --- a/src/pulsecore/flist.h +++ b/src/pulsecore/flist.h @@ -26,6 +26,7 @@ #include #include +#include /* A multiple-reader multipler-write lock-free free list implementation */ @@ -56,6 +57,8 @@ void* pa_flist_pop(pa_flist*l); } \ static void name##_flist_destructor(void) PA_GCC_DESTRUCTOR; \ static void name##_flist_destructor(void) { \ + if (!pa_in_valgrind()) \ + return; \ if (name##_flist.flist) \ pa_flist_free(name##_flist.flist, (free_cb)); \ } \ -- cgit