- add and use a nft_gmp_free() for freeing memory allocated by gmp. - add a free_const() for the many places where we intentionally want to free a const pointer. It still just wraps free(), as the name indicates. Unlike xfree(), which sounds as if xmalloc()/xfree() were a distinct set of allocators. - drop xfree() and use plain free() (or free_const()) everywhere. Thomas Haller (4): datatype: don't return a const string from cgroupv2_get_path() gmputil: add nft_gmp_free() to free strings from mpz_get_str() all: add free_const() and use it instead of xfree() all: remove xfree() and use plain free() include/gmputil.h | 2 + include/nft.h | 6 ++ include/utils.h | 1 - src/cache.c | 6 +- src/ct.c | 2 +- src/datatype.c | 18 ++--- src/erec.c | 6 +- src/evaluate.c | 18 ++--- src/expression.c | 6 +- src/gmputil.c | 21 +++++- src/json.c | 2 +- src/libnftables.c | 24 +++---- src/meta.c | 4 +- src/misspell.c | 2 +- src/mnl.c | 16 ++--- src/netlink_linearize.c | 4 +- src/optimize.c | 12 ++-- src/parser_bison.y | 156 ++++++++++++++++++++-------------------- src/rule.c | 68 +++++++++--------- src/scanner.l | 6 +- src/segtree.c | 4 +- src/statement.c | 4 +- src/utils.c | 5 -- src/xt.c | 10 +-- 24 files changed, 212 insertions(+), 191 deletions(-) -- 2.41.0