Zebediah Figura (@zfigura) commented about dlls/ntoskrnl.exe/ntoskrnl.c:
if (ret == WAIT_OBJECT_0) { HeapFree( GetProcessHeap(), 0, context.in_buff );
context.in_buff = NULL; status = STATUS_SUCCESS; goto done;
This seems unrelated and unnecessary.