diff options
Diffstat (limited to 'sys-utils/umount.c')
-rw-r--r-- | sys-utils/umount.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c index a75ff9ec1..8bc6655ea 100644 --- a/sys-utils/umount.c +++ b/sys-utils/umount.c @@ -445,8 +445,10 @@ static int umount_alltargets(struct libmnt_context *cxt, const char *spec, int r /* get on @cxt independent mountinfo */ tb = new_mountinfo(cxt); - if (!tb) - return MOUNT_EX_SOFTWARE; + if (!tb) { + rc = MOUNT_EX_SOFTWARE; + goto done; + } /* Note that @fs is from mount context and the context will be reseted * after each umount() call */ @@ -468,6 +470,7 @@ static int umount_alltargets(struct libmnt_context *cxt, const char *spec, int r break; } +done: mnt_free_iter(itr); mnt_unref_table(tb); |