18 Oct
2024
18 Oct
'24
11:59 a.m.
Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
{ memcpy(dst_row, src_row, row_pitch); } - - src_row += row_pitch; }
image->image_buf = image->pixels = img_buf; - return D3D_OK; + +exit: + if (img_buf && (image->image_buf != img_buf)) + free(img_buf);
We could `realloc()` the buffer here to release the memory for the temporary row, if decoding was successful. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6688#note_85441