]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser_bison: memleak symbol redefinition
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 28 Jul 2020 17:36:57 +0000 (19:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 29 Jul 2020 21:40:58 +0000 (23:40 +0200)
Missing expr_free() from the error path.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y

index f0cca64136ee13a39ea13bdbd1b4045a8f915e42..167c315810ed5194b8a3fd1c2a6c74611b4fe848 100644 (file)
@@ -862,6 +862,7 @@ common_block                :       INCLUDE         QUOTED_STRING   stmt_separator
                                if (symbol_lookup(scope, $2) != NULL) {
                                        erec_queue(error(&@2, "redefinition of symbol '%s'", $2),
                                                   state->msgs);
+                                       expr_free($4);
                                        xfree($2);
                                        YYERROR;
                                }