Dmitry Timoshkov dmitry@baikal.ru writes:
if (is_file(&data))
{
LPWSTR *new_list;
if (!list)
new_list = CoTaskMemAlloc((enumerated + 1) * sizeof(list[0]));
else
new_list = CoTaskMemRealloc(list, (enumerated + 1) * sizeof(list[0]));
It would be better to double the allocated size.