mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix: Update PlatformMonitoringTech::ioctlReadWriteData call
Update the logic to release the handle in failing cases as well. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
536698d276
commit
5052d4ac4b
@@ -197,6 +197,8 @@ ze_result_t PlatformMonitoringTech::ioctlReadWriteData(std::vector<wchar_t> path
|
||||
// Call DeviceIoControl
|
||||
status = this->pdeviceIoControl(handle, ioctl, bufferIn, inSize, bufferOut, outSize, reinterpret_cast<unsigned long *>(sizeReturned), NULL);
|
||||
|
||||
this->pcloseHandle(handle);
|
||||
|
||||
if (status == FALSE) {
|
||||
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
|
||||
"deviceIoControl call failed\n");
|
||||
@@ -204,8 +206,6 @@ ze_result_t PlatformMonitoringTech::ioctlReadWriteData(std::vector<wchar_t> path
|
||||
return ZE_RESULT_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
this->pcloseHandle(handle);
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user