lib:util: Add a gfree_memcache()
authorAndreas Schneider <asn@samba.org>
Thu, 26 Oct 2023 12:35:44 +0000 (14:35 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 27 Oct 2023 05:54:33 +0000 (05:54 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/memcache.c
lib/util/memcache.h

index 2bf12e0036377bcece557a6eb1f348aa732d495a..98e317c66fb03e8853d3cd4055d0e3223b6a60e3 100644 (file)
@@ -460,3 +460,8 @@ void memcache_flush(struct memcache *cache, enum memcache_number n)
                node = next;
        }
 }
+
+void gfree_memcache(void)
+{
+       TALLOC_FREE(global_cache);
+}
index 4ed023cec99ab40f0aef1c2ca51dfa74e8912d3c..6986760b8cee0670b8df4ecd2aaa4b3bc95e56b5 100644 (file)
@@ -114,4 +114,6 @@ void *memcache_lookup_talloc(struct memcache *cache, enum memcache_number n,
 
 void memcache_flush(struct memcache *cache, enum memcache_number n);
 
+void gfree_memcache(void);
+
 #endif