diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 0cdc7ef78c7..7fb76b047dc 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -646,8 +646,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream* stream, return stat; if((*bitmap)->image.type != ImageTypeBitmap){ - IPicture_Release((*bitmap)->image.picture); - GdipFree(bitmap); + GdipDisposeImage(&(*bitmap)->image); + *bitmap = NULL; return GenericError; /* FIXME: what error to return? */ }