channels/serial: Fix leak found by covscan

leaked_storage: Variable "ids" going out of scope leaks the storage it points to.
This commit is contained in:
Ondrej Holy 2018-08-17 13:55:56 +02:00
parent d3ab04d786
commit 170d5859d2

View File

@ -575,6 +575,8 @@ static void create_irp_thread(SERIAL_DEVICE* serial, IRP* irp)
serial->IrpThreadToBeTerminatedCount);
Sleep(1); /* 1 ms */
}
free(ids);
}
LeaveCriticalSection(&serial->TerminatingIrpThreadsLock);
@ -694,6 +696,7 @@ static void terminate_pending_irp_threads(SERIAL_DEVICE* serial)
}
ListDictionary_Clear(serial->IrpThreads);
free(ids);
}