https://bugs.winehq.org/show_bug.cgi?id=36348
--- Comment #2 from Henri Verbeet hverbeet@gmail.com --- Created attachment 51301 --> https://bugs.winehq.org/attachment.cgi?id=51301 patch
I think the attached patch should help. I don't see how the leaks from comment 0 happen, as far as I can see here the allocations are properly free'd again.