]> 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>
Thu, 30 Nov 2023 09:35:10 +0000 (10:35 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 53bcec4b25a60c125403a80a18ca3aacf1dc8269)

misc-utils/lsfd.c

index 3c5c01f829aef7a2612e80cbdff75cef5650bf8b..f8537a7498711b08ab5f200fcda5d675345f692e 100644 (file)
@@ -1591,6 +1591,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 lsfd_filter *new_filter(const char *expr, bool debug, const char *err_prefix, struct lsfd_control *ctl)