]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fstrim: fix memory leak [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 13:07:49 +0000 (15:07 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 13:07:49 +0000 (15:07 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/fstrim.c

index 5a238c7735cbcc1f8495307de54896b6997bb7a2..7634a5337e897716ae8c8433d7cd621d35e0b0ba 100644 (file)
@@ -213,6 +213,7 @@ static int fstrim_all(struct fstrim_range *rangetpl, int verbose)
 
        sysfs_deinit(&wholedisk);
        mnt_unref_table(tab);
+       mnt_free_iter(itr);
 
        if (cnt && cnt == cnt_err)
                return MOUNT_EX_FAIL;           /* all failed */