Esme Povirk (@madewokherd) commented about dlls/shell32/shlfileop.c:
+ shfoW.fFlags = operations->flags; + + LIST_FOR_EACH_ENTRY_SAFE( ptr, next, &operations->ops, struct file_operation, entry ) + { + TRACE("func: %d\n", ptr->wFunc); + if (ptr->wFunc == FO_NEW) + { + if (ptr->pTemplateName) + FIXME("stub template\n"); + + ret = new_item(ptr->pTo, ptr->pNewName, ptr->attributes, operations); + + if (ptr->pNewName) free((void*)ptr->pNewName); + if (ptr->pTo) free((void*)ptr->pTo); + if (ptr->pTemplateName) free((void*)ptr->pTemplateName); + list_remove(&ptr->entry); There should probably be a common "free_item" function. I'm noticing some inconsistency, in that this case doesn't `free(ptr)` and not every case frees all string fields.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4817#note_58414