shell32: Always allocate a whole ITEMIDLIST structure.

Partially allocating a structure generates -Warray-bounds warnings
with GCC11. In this specific case, given the rounding in memory
allocators, would even not increase the effective allocated size.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-03-24 10:13:26 +01:00 committed by Alexandre Julliard
parent f9923d6bb9
commit e62dd2a5b6
1 changed files with 1 additions and 1 deletions

View File

@ -1574,7 +1574,7 @@ LPITEMIDLIST _ILCreateDesktop(void)
LPITEMIDLIST ret;
TRACE("()\n");
ret = SHAlloc(2);
ret = SHAlloc(sizeof(*ret));
if (ret)
ret->mkid.cb = 0;
return ret;