do not cleanup staticly allocated memory unless we are in valgrind mode

This commit is contained in:
Lennart Poettering 2008-10-04 00:14:02 +02:00
parent 3c193520ee
commit 82c46f2238
3 changed files with 9 additions and 0 deletions

View file

@ -85,6 +85,9 @@ void pa_log_set_ident(const char *p) {
/* To make valgrind shut up. */
static void ident_destructor(void) PA_GCC_DESTRUCTOR;
static void ident_destructor(void) {
if (!pa_in_valgrind())
return;
pa_xfree(log_ident);
pa_xfree(log_ident_local);
}