diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-04-05 14:09:56 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-04-05 15:48:36 +0200 |
commit | 4d97f0a4eebd25d1639cd7c7ac2452445205a819 (patch) | |
tree | bfa240c835db86f1a4284a13418b707846784a53 /src | |
parent | e07be57df3f5191d23b05c4fb06a94f3961beb13 (diff) |
parser_bison: type_identifier string memleak
==6297== 24 bytes in 3 blocks are definitely lost in loss record 2 of 13
==6297== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6297== by 0x56193B9: strdup (strdup.c:42)
==6297== by 0x4E758BD: xstrdup (utils.c:75)
==6297== by 0x4E7F9D3: nft_parse (parser_bison.y:1895)
==6297== by 0x4E7AAE1: nft_parse_bison_filename (libnftables.c:370)
==6297== by 0x4E7AAE1: nft_run_cmd_from_filename (libnftables.c:438)
==6297== by 0x109A33: main (main.c:310)
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/parser_bison.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index 50642b4e..343df12a 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1796,11 +1796,11 @@ data_type_atom_expr : type_identifier if (dtype == NULL) { erec_queue(error(&@1, "unknown datatype %s", $1), state->msgs); - xfree($1); YYERROR; } $$ = constant_expr_alloc(&@1, dtype, dtype->byteorder, dtype->size, NULL); + xfree($1); } ; |