summaryrefslogtreecommitdiffstats
path: root/src/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache.c')
-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;