From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [PATCH nft 0/4] remove xfree() and add free_const()+nft_gmp_free()
Date: Wed, 20 Sep 2023 15:13:37 +0200 [thread overview]
Message-ID: <20230920131554.204899-1-thaller@redhat.com> (raw)
- 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
next reply other threads:[~2023-09-20 13:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 13:13 Thomas Haller [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230920131554.204899-1-thaller@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.