chiark / gitweb /
virt: Update cache if the detected vm is virtualbox (#5364)
[elogind.git] / src / basic / virt.c
index 66ce7ecfee4a3da765039f70f17147fe0271aca8..276df83526cb93db3e35c19898ba023aa36ea2e1 100644 (file)
@@ -328,8 +328,10 @@ int detect_vm(void) {
          * -> Third try to detect from dmi. */
 
         dmi = detect_vm_dmi();
          * -> Third try to detect from dmi. */
 
         dmi = detect_vm_dmi();
-        if (dmi == VIRTUALIZATION_ORACLE)
-                return dmi;
+        if (dmi == VIRTUALIZATION_ORACLE) {
+                r = dmi;
+                goto finish;
+        }
 
         r = detect_vm_cpuid();
         if (r < 0)
 
         r = detect_vm_cpuid();
         if (r < 0)