ntoskrnl.exe: Fix use-after-free when freeing IRP.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2021-10-07 10:02:33 -07:00 committed by Alexandre Julliard
parent c9003fab66
commit de0e9ad965
1 changed files with 2 additions and 1 deletions

View File

@ -1011,8 +1011,9 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
{
if (context.irp_data->complete)
{
IoCompleteRequest( context.irp_data->irp, IO_NO_INCREMENT );
IRP *irp = context.irp_data->irp;
free_dispatch_irp( context.irp_data );
IoCompleteRequest( irp, IO_NO_INCREMENT );
}
else
{