summaryrefslogtreecommitdiff
path: root/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.c b/cache.c
index 0ccda9c..ea3115a 100644
--- a/cache.c
+++ b/cache.c
@@ -92,6 +92,7 @@ void* do_cache_alloc(cache_t *cache) {
free(ret);
object = NULL;
}
+ cache->total++;
}
}
@@ -148,7 +149,7 @@ void do_cache_free(cache_t *cache, void *ptr) {
cache->destructor(ptr, NULL);
}
free(ptr);
-
+ cache->total--;
}
}
}