diff options
author | Karel Zak | 2012-01-30 23:02:43 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-30 23:17:47 +0100 |
commit | 314f2522267c849389070b9bc0e53a0ea10035f7 (patch) | |
tree | 788e8d0107f4192d7ed48709ad6cc5d160f103dd /libmount/src/context_umount.c | |
parent | libblkid: fix use-after-free [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-314f2522267c849389070b9bc0e53a0ea10035f7.tar.gz kernel-qcow2-util-linux-314f2522267c849389070b9bc0e53a0ea10035f7.tar.xz kernel-qcow2-util-linux-314f2522267c849389070b9bc0e53a0ea10035f7.zip |
libmount: fix checked-return [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r-- | libmount/src/context_umount.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index ee1a648bc..1be29f9ea 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -808,11 +808,14 @@ int mnt_context_next_umount(struct libmnt_context *cxt, if (!cxt || !fs || !itr) return -EINVAL; - mnt_context_get_mtab(cxt, &mtab); + rc = mnt_context_get_mtab(cxt, &mtab); cxt->mtab = NULL; /* do not reset mtab */ mnt_reset_context(cxt); cxt->mtab = mtab; + if (rc) + return rc; + do { rc = mnt_table_next_fs(mtab, itr, fs); if (rc != 0) |