]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: drop superfluous call yo yylex_init()
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 28 Apr 2026 22:08:09 +0000 (00:08 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 28 Apr 2026 22:09:00 +0000 (00:09 +0200)
The lexer is already initialized with yylex_init_extra(),
making the call to yylex_init() superfluous.
Furthermore this is leaking memory.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libsmartcols/src/filter.c

index 2ce28ebd73b219d05e03833599a62b64f9cb1600..011b21c22c3938f40fc3b96186251d29d0490e78 100644 (file)
@@ -195,7 +195,6 @@ int scols_filter_parse_string(struct libscols_filter *fltr, const char *str)
        if (!fltr->src)
                return -errno;
 
-       yylex_init(&sc);
        yylex_init_extra(fltr, &sc);
        yyset_in(fltr->src, sc);