Cosmetics, but support unsetting anything that may be set. Fixes: 76b82c425818e ("chain: add userdata and comment support") Signed-off-by: Phil Sutter <phil@xxxxxx> --- 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