gdiplus: Free memory on a failure.

This commit is contained in:
Lei Zhang 2008-09-28 12:17:26 -07:00 committed by Alexandre Julliard
parent 8d53fc56fe
commit fc753bbb58
1 changed files with 5 additions and 1 deletions

View File

@ -586,7 +586,11 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
abs(stride));
*texture = GdipAlloc(sizeof(GpTexture));
if (!*texture) return OutOfMemory;
if (!*texture){
GdipFree(dibits);
GdipFree(buff);
return OutOfMemory;
}
if((status = GdipCreateMatrix(&(*texture)->transform)) != Ok){
GdipFree(*texture);