Esme Povirk (@madewokherd) commented about dlls/shell32/shlfileop.c:
- ULONG ref = InterlockedDecrement(&operation->ref);
struct file_operations *operations = impl_from_IFileOperation(iface);
struct file_operation *ptr, *next;
ULONG ref = InterlockedDecrement(&operations->ref);
TRACE("(%p): ref=%lu.\n", iface, ref);
if (!ref) {
free(operation);
LIST_FOR_EACH_ENTRY_SAFE( ptr, next, &operations->ops, struct file_operation, entry )
{
if (ptr->pFrom) free((void*)ptr->pFrom);
if (ptr->pTo) free((void*)ptr->pTo);
if (ptr->pNewName) free((void*)ptr->pNewName);
if (ptr->pTemplateName) free((void*)ptr->pTemplateName);
If these are really constant strings then we shouldn't be freeing them. I'm guessing the type should just be LPWSTR.