From 7db4333dc0b6cd8e943fab78d6dab40ff9f4512e Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 5 May 2020 13:56:11 +0200 Subject: libxtables: Introduce xtables_fini() Record handles of loaded shared objects in a linked list and dlclose() them from the newly introduced function. While functionally not necessary, this clears up valgrind's memcheck output when also displaying reachable memory. Since this is an extra function that doesn't change the existing API, increment both current and age. Signed-off-by: Phil Sutter --- include/xtables.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/xtables.h b/include/xtables.h index 4aa084a1..5044dd08 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -448,6 +448,7 @@ extern struct xtables_match *xtables_matches; extern struct xtables_target *xtables_targets; extern void xtables_init(void); +extern void xtables_fini(void); extern void xtables_set_nfproto(uint8_t); extern void *xtables_calloc(size_t, size_t); extern void *xtables_malloc(size_t); -- cgit v1.2.3