Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/gdiplus/tests/image.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 5aec1c283a..aede76bc2f 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -5389,6 +5389,8 @@ static void test_GdipInitializePalette(void) status = GdipCreateBitmapFromScan0(width, height, stride, PixelFormat24bppRGB, data, &bitmap); expect(Ok, status);
+ HeapFree(GetProcessHeap(), 0, data); + palette = GdipAlloc(sizeof(*palette) + sizeof(ARGB) * 255);
palette->Flags = 0;
Image buffers passed into Bitmap constructors such as GdipCreateBitmapFromScan0 are referenced by the Bitmap object and must be valid for the Bitmap's lifetime.
On 21-02-19 17:10, Vincent Povirk wrote:
Image buffers passed into Bitmap constructors such as GdipCreateBitmapFromScan0 are referenced by the Bitmap object and must be valid for the Bitmap's lifetime.
I had the free at the bottom of the function first, but then no tests failed when I moved it to the top, so I left it there instead. I'll move it back to the bottom.