mirror of
https://github.com/reactos/wine.git
synced 2025-02-25 15:33:47 +00:00
setupapi: Allocate the proper number of bytes for the drive spec.
Spotted with Valgrind.
This commit is contained in:
parent
dd1b937287
commit
a91fd8fbb2
@ -177,7 +177,7 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
driveW = HeapAlloc(GetProcessHeap(), 0, lstrlenW(DriveSpec) + 2);
|
driveW = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(DriveSpec) + 2) * sizeof(WCHAR));
|
||||||
if (!driveW)
|
if (!driveW)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user