Matteo Bruni (@Mystral) commented about dlls/ntdll/tests/file.c:
+{
- FILE_RENAME_INFORMATION *fri;
- UNICODE_STRING ntpath;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- BOOLEAN ret;
- ULONG size;
- ret = pRtlDosPathNameToNtPathName_U( filename, &ntpath, NULL, NULL );
- lok( ret, "RtlDosPathNameToNtPathName_U failed\n" );
- if (!ret) return FALSE;
- size = offsetof( FILE_RENAME_INFORMATION, FileName ) + ntpath.Length;
- fri = HeapAlloc( GetProcessHeap(), 0, size );
- lok( fri != NULL, "HeapAlloc failed\n" );
- if (!fri) return FALSE;
Same here for this HeapAlloc() call with very small size.