netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 0/4] remove xfree() and add free_const()+nft_gmp_free()
@ 2023-09-20 13:13 Thomas Haller
  2023-09-20 13:13 ` [PATCH nft 1/4] datatype: don't return a const string from cgroupv2_get_path() Thomas Haller
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Thomas Haller @ 2023-09-20 13:13 UTC (permalink / raw)
  To: NetFilter; +Cc: Thomas Haller

- 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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-09-21 20:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 13:13 [PATCH nft 0/4] remove xfree() and add free_const()+nft_gmp_free() Thomas Haller
2023-09-20 13:13 ` [PATCH nft 1/4] datatype: don't return a const string from cgroupv2_get_path() Thomas Haller
2023-09-20 13:13 ` [PATCH nft 2/4] gmputil: add nft_gmp_free() to free strings from mpz_get_str() Thomas Haller
2023-09-20 14:05   ` Phil Sutter
2023-09-20 14:46     ` Thomas Haller
2023-09-20 16:04       ` Phil Sutter
2023-09-20 13:13 ` [PATCH nft 3/4] all: add free_const() and use it instead of xfree() Thomas Haller
2023-09-20 14:13   ` Phil Sutter
2023-09-20 16:06     ` Pablo Neira Ayuso
2023-09-20 16:49       ` Phil Sutter
2023-09-20 16:52         ` Pablo Neira Ayuso
2023-09-20 18:03         ` Thomas Haller
2023-09-20 18:22           ` Phil Sutter
2023-09-20 19:48             ` Thomas Haller
2023-09-20 22:50               ` Phil Sutter
2023-09-21  9:08                 ` Thomas Haller
2023-09-20 13:13 ` [PATCH nft 4/4] all: remove xfree() and use plain free() Thomas Haller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).