Zebediah Figura (@zfigura) commented about dlls/ntoskrnl.exe/ntoskrnl.c:
irp->Tail.Overlay.Thread = (PETHREAD)KeGetCurrentThread(); irp->Tail.Overlay.OriginalFileObject = file; irp->RequestorMode = UserMode;
- HeapFree( GetProcessHeap(), 0, context->in_buff ); context->in_buff = NULL;
I don't think we need to be deallocating the input buffer; we're not using it. Rather we should just remove the assignment to NULL.