Fixed memory leak.

This commit is contained in:
Armin Novak 2014-11-17 00:55:25 +01:00
parent 9753b63dda
commit 66412a082e

View File

@ -59,7 +59,10 @@ rdtkSurface* rdtk_surface_new(rdtkEngine* engine, BYTE* data, int width, int hei
surface->data = (BYTE*) malloc(surface->scanline * surface->height);
if (!surface->data)
{
free(surface);
return NULL;
}
ZeroMemory(surface->data, surface->scanline * surface->height);