Piotr Caban (@piotr) commented about dlls/msvcrt/dir.c:
if (dir_len < 1) return NULL; /* FIXME: Real return value untested */
- if (!buf)
- {
if (size <= dir_len) size = dir_len + 1;
if (!(buf = malloc( size * sizeof(WCHAR) ))) return NULL;
- }
- if (!buf && size <= dir_len)
- size = dir_len + 1; if (dir_len >= size)
There's no leak here. In case !buf we're updating size if it's to small.
The code can be changed to: ```suggestion:-0+0 else if (dir_len >= size) ``` to make it easier to read.