kernel32/tests: Don't forget to delete a temporary file.
This commit is contained in:
parent
9703bee560
commit
294adeec4f
|
@ -3843,6 +3843,7 @@ static void test_SetFileValidData(void)
|
||||||
{
|
{
|
||||||
win_skip("cannot enable SE_MANAGE_VOLUME_NAME privilege\n");
|
win_skip("cannot enable SE_MANAGE_VOLUME_NAME privilege\n");
|
||||||
CloseHandle(token);
|
CloseHandle(token);
|
||||||
|
DeleteFileA(filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
|
@ -3906,7 +3907,9 @@ static void test_SetFileValidData(void)
|
||||||
|
|
||||||
privs.Privileges[0].Attributes = 0;
|
privs.Privileges[0].Attributes = 0;
|
||||||
AdjustTokenPrivileges(token, FALSE, &privs, sizeof(privs), NULL, NULL);
|
AdjustTokenPrivileges(token, FALSE, &privs, sizeof(privs), NULL, NULL);
|
||||||
|
|
||||||
CloseHandle(token);
|
CloseHandle(token);
|
||||||
|
CloseHandle(handle);
|
||||||
DeleteFileA(filename);
|
DeleteFileA(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue