From: Karel Zak Date: Mon, 30 Jan 2012 22:44:31 +0000 (+0100) Subject: mount: (new) fix resource leak [coverity scan] X-Git-Tag: v2.21-rc2~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25609ee1be4d13d00963873ee80c05f7748224be;p=thirdparty%2Futil-linux.git mount: (new) fix resource leak [coverity scan] 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 --- diff --git a/sys-utils/mount.c b/sys-utils/mount.c index e4b3e4f7c4..15510e0131 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -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; }