From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute
Date: Wed, 10 Jul 2024 17:33:22 +0200 [thread overview]
Message-ID: <20240710153322.18574-2-phil@nwl.cc> (raw)
In-Reply-To: <20240710153322.18574-1-phil@nwl.cc>
Cosmetics, but support unsetting anything that may be set.
Fixes: 99be0e6d066d7 ("table: add userdata support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/table.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/table.c b/src/table.c
index 13f01cfbf1e6f..1a5f6f3bcc507 100644
--- a/src/table.c
+++ b/src/table.c
@@ -74,6 +74,9 @@ void nftnl_table_unset(struct nftnl_table *t, uint16_t attr)
case NFTNL_TABLE_NAME:
xfree(t->name);
break;
+ case NFTNL_TABLE_USERDATA:
+ xfree(t->user.data);
+ break;
case NFTNL_TABLE_FLAGS:
case NFTNL_TABLE_HANDLE:
case NFTNL_TABLE_FAMILY:
--
2.43.0
next prev parent reply other threads:[~2024-07-10 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 15:33 [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
2024-07-10 15:33 ` Phil Sutter [this message]
2024-07-10 21:09 ` Phil Sutter
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=20240710153322.18574-2-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox