diff --git a/reactos/ntoskrnl/ps/query.c b/reactos/ntoskrnl/ps/query.c index 11bde0afdf2..235efb5fe65 100644 --- a/reactos/ntoskrnl/ps/query.c +++ b/reactos/ntoskrnl/ps/query.c @@ -426,6 +426,14 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, } _SEH_END; } + else + { + /* Buffer too small */ + Status = STATUS_INFO_LENGTH_MISMATCH; + } + + /* Free the image path */ + ExFreePool(ImageName); } break;