Commit 56101c9d authored by Kevin E Martin's avatar Kevin E Martin

Fix fd leak by closing them in the ACPI code instead of just using

    shutdown.
parent 7993486e
......@@ -130,6 +130,7 @@ lnxACPIOpen(void)
strcpy(addr.sun_path, ACPI_SOCKET);
if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) {
shutdown(fd, 2);
close(fd);
fd = -1;
}
}
......@@ -162,6 +163,7 @@ lnxCloseACPI(void)
if (ACPIihPtr) {
fd = xf86RemoveInputHandler(ACPIihPtr);
shutdown(fd, 2);
close(fd);
ACPIihPtr = NULL;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment