Fix handle replication logic

DesktopSendMessage duplicates handle before sending copies of the message.
Yet it forgets to restore message->device.handle and so message->device.handle
has last duplicated handle which may be closed before we actually use it
and lead to process crash and kernel panic
This commit is contained in:
Vladimir Serbinenko 2023-08-06 03:21:16 +02:00
parent e79b5fba79
commit 471b1fe208
1 changed files with 2 additions and 0 deletions

View File

@ -3213,6 +3213,8 @@ void DesktopSendMessage(EsMessage *message) {
}
}
message->device.handle = handle;
if (message->device.type == ES_DEVICE_CLOCK) {
EsDateComponents reading;
uint64_t linear;