]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: (new) fix resource leak [coverity scan]
authorKarel Zak <kzak@redhat.com>
Mon, 30 Jan 2012 22:44:31 +0000 (23:44 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 30 Jan 2012 22:49:15 +0000 (23:49 +0100)
well, this is free-before-exit, but let's use mount(8) as test
application for libmount and keep it without leaks.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mount.c

index e4b3e4f7c49987c1b4e27cd36e661f5655bdf053..15510e0131628ec362087a4d71446d7e1f760de4 100644 (file)
@@ -222,6 +222,7 @@ static int mount_all(struct libmnt_context *cxt)
                        rc = nchildren == nerrs ? MOUNT_EX_FAIL : MOUNT_EX_SOMEOK;
        }
 
+       mnt_free_iter(itr);
        return rc;
 }