From a887d587bf960e8970b8bc5448c64c2139456219 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 25 Mar 2021 11:53:02 +0100 Subject: [PATCH] fstrim: fix memory leak [coverity scan] Signed-off-by: Karel Zak --- sys-utils/fstrim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index fef33b044f..e8f0060839 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -280,6 +280,7 @@ static int fstrim_all_from_file(struct fstrim_control *ctl, const char *filename mnt_unref_fs(fs); fs = NULL; } + free(rootdev); } itr = mnt_new_iter(MNT_ITER_BACKWARD); -- 2.47.3