diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-04 00:14:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-04 00:14:02 +0200 |
commit | 82c46f223823e8359ee2b788a83eac0ab82c912a (patch) | |
tree | 7d19ffee51ac5d0ddabcbad85691d5f64f28282c /src/pulsecore/flist.h | |
parent | 3c193520ee59703b9e4453db0bff8f9c6b8a06c2 (diff) |
do not cleanup staticly allocated memory unless we are in valgrind mode
Diffstat (limited to 'src/pulsecore/flist.h')
-rw-r--r-- | src/pulsecore/flist.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 <pulse/gccmacro.h> #include <pulsecore/once.h> +#include <pulsecore/core-util.h> /* 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)); \ } \ |