From: Karel Zak Date: Thu, 25 Mar 2021 10:53:02 +0000 (+0100) Subject: fstrim: fix memory leak [coverity scan] X-Git-Tag: v2.37-rc1~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a887d587bf960e8970b8bc5448c64c2139456219;p=thirdparty%2Futil-linux.git fstrim: fix memory leak [coverity scan] Signed-off-by: Karel Zak --- 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);