summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-06-30 08:50:49 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-06-30 08:50:49 +0000
commit0483be72c30006a77a683a95694238b2b73a1887 (patch)
treeb9f90554b69c712274b6fd47f6f6006507ec43ec /xserver
parent218b42f5efdb66fc83075c3f217a74ec160a0624 (diff)
Close the console fd after probing if it's a wscons, even it fails.
This avoids keeping an open file descriptor on machines where /dev/console is not a wsdisplay device.
Diffstat (limited to 'xserver')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/bsd_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_init.c b/xserver/hw/xfree86/os-support/bsd/bsd_init.c
index 8eb65b409..f6c19d090 100644
--- a/xserver/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/xserver/hw/xfree86/os-support/bsd/bsd_init.c
@@ -627,9 +627,9 @@ xf86OpenWScons(void)
/* strip number, assuming 0 */
p = strchr(vtprefix, '0');
*p = '\0';
- close(fd);
fd = -1;
}
+ close(fd);
}
}
if (VTnum != -1) {