From 53bcec4b25a60c125403a80a18ca3aacf1dc8269 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 25 Apr 2024 15:12:56 +0800
Subject: [PATCH] lsfd: fix memory leak in append_filter_expr()

---
 misc-utils/lsfd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c
index 9f74862..56c0f7a 100644
--- a/misc-utils/lsfd.c
+++ b/misc-utils/lsfd.c
@@ -1590,6 +1590,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)
-- 
2.27.0

