From: Phil Sutter Date: Wed, 10 Jul 2024 15:22:16 +0000 (+0200) Subject: chain: Support unsetting NFTNL_CHAIN_USERDATA attribute X-Git-Tag: libnftnl-1.2.7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=490bc700fdef5d589399277a8bfd13eec5ca9636;p=thirdparty%2Flibnftnl.git chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Cosmetics, but support unsetting anything that may be set. Fixes: 76b82c425818e ("chain: add userdata and comment support") Signed-off-by: Phil Sutter --- diff --git a/src/chain.c b/src/chain.c index c7026f48..0b68939f 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; }