On Wed Nov 29 16:30:11 2023 +0000, Alex Henrie wrote:
changed this line in [version 4 of the diff](/wine/wine/-/merge_requests/4319/diffs?diff_id=86784&start_sha=1b78df7f86176676cc50f563b1f2072b5ebedb30#aaf93e29527c1cbc47ec54679da5828ebd679128_6839_6839)
That was a mistake, thank you for catching it. I was thinking that the Clone functions needed to use GdipAlloc for the memory that they return to the caller. Then I found https://www.winehq.org/pipermail/wine-patches/2015-October/142735.html which makes it clear that they should _not_ use GdipAlloc, but I forgot to change GdipCloneRegion back.
By the way, unlike Sebastian's patch, in v3 I did change anything that uses heap_alloc_zero(size) and then immediately overwrites the entire buffer to malloc(size) instead of calloc(1, size). Using calloc when we don't actually want to zero-initialize the buffer made the code look strange and overcomplicated.