1 Dec
2023
1 Dec
'23
11:42 a.m.
Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/effect.c:
if (!new_alloc) { - HeapFree(GetProcessHeap(), 0, names); + free(names); return NULL; } names = new_alloc; } names[(*names_count)++] = name; } - new_alloc = HeapReAlloc(GetProcessHeap(), 0, names, *names_count * sizeof(*names)); - if (!new_alloc) - return names; - return new_alloc; + names = realloc(names, *names_count * sizeof(*names)); + return names;
Please keep the check on shrinking reallocation. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4539#note_54559