DragonFlyBSD Kernel Audit
DF-1512 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/video/vga/vga_switcheroo.c b/sys/dev/video/vga/vga_switcheroo.c
--- a/sys/dev/video/vga/vga_switcheroo.c
+++ b/sys/dev/video/vga/vga_switcheroo.c
@@ -557,6 +557,7 @@
 	mutex_lock(&vgasr_priv->mux_hw_lk);
 	if (!vgasr_priv->handler || !vgasr_priv->handler->switch_ddc) {
 		vgasr_priv->old_ddc_owner = -ENODEV;
+		mutex_unlock(&vgasr_priv->mux_hw_lk);
 		return -ENODEV;
 	}