Linux Netfilter development
 help / color / mirror / Atom feed
* [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute
@ 2024-07-10 15:33 Phil Sutter
  2024-07-10 15:33 ` [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute Phil Sutter
  2024-07-10 21:09 ` [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
  0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2024-07-10 15:33 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

Cosmetics, but support unsetting anything that may be set.

Fixes: 76b82c425818e ("chain: add userdata and comment support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/chain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/chain.c b/src/chain.c
index c7026f486b104..0b68939fe21a7 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -185,6 +185,9 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr)
 			xfree(c->dev_array[i]);
 		xfree(c->dev_array);
 		break;
+	case NFTNL_CHAIN_USERDATA:
+		xfree(c->user.data);
+		break;
 	default:
 		return;
 	}
-- 
2.43.0


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

end of thread, other threads:[~2024-07-10 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 15:33 [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
2024-07-10 15:33 ` [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute Phil Sutter
2024-07-10 21:09 ` [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox