Skip to contentSkip to conversation

expression: memleak in verdict_expr_parse_udata()

PATCH New Pablo Neira Ayuso 1 participant 1 message Mar 5, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 expression: memleak in verdict_expr_parse_udata()

Remove unnecessary verdict_expr_alloc() invocation.

Fixes 4ab1e5e60779 ("src: allow use of 'verdict' in typeof definitions")
---
 src/expression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/expression.c +1 -1
index 8c6beef9a5e5..0c5276d1118d 100644
@@ -260,7 +260,7 @@ static int verdict_expr_build_udata(struct nftnl_udata_buf *udbuf,
 
 static struct expr *verdict_expr_parse_udata(const struct nftnl_udata *attr)
 {
-	struct expr *e = verdict_expr_alloc(&internal_location, 0, NULL);
+	struct expr *e;
 
 	e = symbol_expr_alloc(&internal_location, SYMBOL_VALUE, NULL, "verdict");
 	e->len = NFT_REG_SIZE * BITS_PER_BYTE;
Signature · 1 line
2.20.1