diff options
author | Phil Sutter <phil@nwl.cc> | 2020-05-05 13:56:11 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-05-11 14:28:29 +0200 |
commit | 7db4333dc0b6cd8e943fab78d6dab40ff9f4512e (patch) | |
tree | 351ee8f17a1b795dced28f65f04e43681eef9499 /iptables/xtables-translate.c | |
parent | 869e38fcdecda3de35d999b75fbaacc750fe3aaa (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-translate.c')
-rw-r--r-- | iptables/xtables-translate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 76ad7eb6..5aa42496 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -509,6 +509,7 @@ static int xtables_xlate_main(int family, const char *progname, int argc, fprintf(stderr, "Translation not implemented\n"); nft_fini(&h); + xtables_fini(); exit(!ret); } @@ -563,6 +564,7 @@ static int xtables_restore_xlate_main(int family, const char *progname, printf("# Completed on %s", ctime(&now)); nft_fini(&h); + xtables_fini(); fclose(p.in); exit(0); } |