qemu: Jump to cleanup label on umount failure

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@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jim Fehlig 2023-02-06 10:40:12 -07:00
parent 5c4007ddc6
commit c3f16cea3b

View File

@ -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__) */