netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] parser_bison: free chain name after creating constant expression
@ 2019-06-10 17:25 Pablo Neira Ayuso
  0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2019-06-10 17:25 UTC (permalink / raw)
  To: netfilter-devel; +Cc: ffmancera

==2330== 2 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2330==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==2330==    by 0x583D3B9: strdup (strdup.c:42)
==2330==    by 0x4E7966D: xstrdup (utils.c:75)
==2330==    by 0x4E9C283: nft_lex (scanner.l:626)
==2330==    by 0x4E8E3C2: nft_parse (parser_bison.c:5297)
==2330==    by 0x4E7EAB2: nft_parse_bison_filename (libnftables.c:374)
==2330==    by 0x4E7EAB2: nft_run_cmd_from_filename (libnftables.c:475)
==2330==    by 0x109A53: main (main.c:310)

Fixes: f1e8a129ee42 ("src: Introduce chain_expr in jump and goto statements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/parser_bison.y | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/parser_bison.y b/src/parser_bison.y
index 5ffb5cc22145..97a48f38af0c 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -3826,6 +3826,7 @@ chain_expr		:	variable_expr
 							 BYTEORDER_HOST_ENDIAN,
 							 strlen($1) * BITS_PER_BYTE,
 							 $1);
+				xfree($1);
 			}
 			;
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-10 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-10 17:25 [PATCH nft] parser_bison: free chain name after creating constant expression Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).