]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: fix memory leak in append_filter_expr()
authorKarel Zak <kzak@redhat.com>
Thu, 2 Nov 2023 11:42:55 +0000 (12:42 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 20 Nov 2023 21:25:47 +0000 (22:25 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsfd.c

index b8a36dcc777603f637ce97bd728788c9f1b82a15..d01bb7bfe84f07d288341c8eed66ce9f56a16b48 100644 (file)
@@ -1870,6 +1870,8 @@ static void append_filter_expr(char **a, const char *b, bool and)
                xstrappend(a, "or(");
        xstrappend(a, b);
        xstrappend(a, ")");
+
+       free(tmp);
 }
 
 static struct libscols_filter *new_filter(const char *expr, bool debug, struct lsfd_control *ctl)