Jacek Caban (@jacek) commented about dlls/winevulkan/vulkan.c:
- {
struct wine_debug_report_callback *callback = (struct wine_debug_report_callback *)callback_info->pUserData;
if (callback_info->pfnCallback != debug_report_callback_conversion) break;
/* restore previous create info values, if VkCreateInstance needs to be called again */
callback_info->pfnCallback = callback->user_callback;
callback_info->pUserData = callback->user_data;
if (!object) free(callback);
else
{
callback->instance = object;
list_add_tail(&object->debug_report_callbacks, &callback->entry);
}
- }
+}
This is not exactly a cleanup given that you set object pointer and add the callback to the list here. It seems to me that you could simply do that in `wine_vk_instance_convert_create_info` instead. For error case, `wine_vk_instance_free` should do the right thing anyway.