[PATCH] qemu: Jump to cleanup label on umount failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similar to other error paths in qemuDomainUnshareNamespace(), jump to
the cleanup label on umount error instead of directly returning -1.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---

I noticed this while looking at a bug report containing the error. ATM I'm not
sure why the umount failed, but have asked for more info in the bug

https://bugzilla.opensuse.org/show_bug.cgi?id=1207889

 src/qemu/qemu_namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
index 5769a4dfe0..833313d5a6 100644
--- a/src/qemu/qemu_namespace.c
+++ b/src/qemu/qemu_namespace.c
@@ -779,7 +779,7 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg,
 #if defined(__linux__)
     if (umount("/dev") < 0) {
         virReportSystemError(errno, "%s", _("failed to umount devfs on /dev"));
-        return -1;
+        goto cleanup;
     }
 #endif /* !defined(__linux__) */
 
-- 
2.39.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux