25 Jul
2024
25 Jul
'24
9:11 a.m.
Piotr Caban (@piotr) commented about dlls/msvcrt/dir.c:
if (size < 4) { + if (alloced) + free(buffer);
There's no leak in this function. `size` is set to `MAX_PATH` when `alloced` is set to TRUE. A quick testing shows that the function may be improved though (e.g. we shouldn't ignore `size` parameter when buffer gets allocated). How did you spot this? Is there any compiler that prints a warning on this code? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6152#note_77040