summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-13 18:51:39 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-13 18:51:39 +0200
commite1d7d1121e89313312474a5e9f3aad0f58829a82 (patch)
tree9eba7fd2b4d2bbc12d600eb60e3a48ab1f5e91bb /src
parent68c5eb534423787400e220dbfbf43df77c1557a2 (diff)
cache: don't use destructors unless running in valgrind
Diffstat (limited to 'src')
-rw-r--r--src/cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cache.c b/src/cache.c
index bf2d2a0..2a8f957 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -227,6 +227,10 @@ static void db_close(void) CA_GCC_DESTRUCTOR;
static void db_close(void) {
/* Only here to make this valgrind clean */
+
+ if (!getenv("VALGRIND"))
+ return;
+
if (mutex) {
ca_mutex_free(mutex);
mutex = NULL;