mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:42:56 +00:00
[KMTESTS:IO] Correctly free name in IoFilesystem's TestAllInformation.
Spotted by Serge Gautherie.
This commit is contained in:
parent
9bc2a27393
commit
0cc3f19b80
1 changed files with 2 additions and 3 deletions
|
@ -73,7 +73,7 @@ TestAllInformation(VOID)
|
||||||
PFILE_ALL_INFORMATION FileAllInfo;
|
PFILE_ALL_INFORMATION FileAllInfo;
|
||||||
SIZE_T Length;
|
SIZE_T Length;
|
||||||
ULONG NameLength;
|
ULONG NameLength;
|
||||||
PWCHAR Name = NULL;
|
PWCHAR Name;
|
||||||
UNICODE_STRING NamePart;
|
UNICODE_STRING NamePart;
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
@ -161,6 +161,7 @@ TestAllInformation(VOID)
|
||||||
ok(RtlEqualUnicodeString(&NamePart, &Ntoskrnl, TRUE),
|
ok(RtlEqualUnicodeString(&NamePart, &Ntoskrnl, TRUE),
|
||||||
"Name ends in '%wZ', expected %wZ\n", &NamePart, &Ntoskrnl);
|
"Name ends in '%wZ', expected %wZ\n", &NamePart, &Ntoskrnl);
|
||||||
}
|
}
|
||||||
|
ExFreePoolWithTag(Name, 'sFmK');
|
||||||
}
|
}
|
||||||
ok(FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)] == 0xdddd,
|
ok(FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)] == 0xdddd,
|
||||||
"Char past FileName is %x\n",
|
"Char past FileName is %x\n",
|
||||||
|
@ -209,8 +210,6 @@ TestAllInformation(VOID)
|
||||||
if (FileAllInfo)
|
if (FileAllInfo)
|
||||||
KmtFreeGuarded(FileAllInfo);
|
KmtFreeGuarded(FileAllInfo);
|
||||||
|
|
||||||
ExFreePoolWithTag(Name, 'sFmK');
|
|
||||||
|
|
||||||
Status = ObCloseHandle(FileHandle, KernelMode);
|
Status = ObCloseHandle(FileHandle, KernelMode);
|
||||||
ok_eq_hex(Status, STATUS_SUCCESS);
|
ok_eq_hex(Status, STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue