Skip to content

Commit 2449342

Browse files
Merge pull request #15 from FrameworkComputer/close-handle
OnReleaseHardware: Close EC driver handle
2 parents 0c75548 + 9d428b5 commit 2449342

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

FrameworkSensors/Device.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ OnReleaseHardware(
403403
pDevice->m_Lock = NULL;
404404
}
405405

406+
// Close handle to EC driver
407+
if (pDevice->m_CrosEcHandle && pDevice->m_CrosEcHandle != INVALID_HANDLE_VALUE) {
408+
CloseHandle(pDevice->m_CrosEcHandle);
409+
pDevice->m_CrosEcHandle = INVALID_HANDLE_VALUE;
410+
}
411+
406412
// Delete sensor instance
407413
if (NULL != pDevice->m_SensorInstance)
408414
{

0 commit comments

Comments
 (0)