]> git.jsancho.org Git - lugaru.git/commitdiff
Whoops, nasty malloc bug.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 24 Aug 2005 16:51:29 +0000 (16:51 +0000)
committerRyan C. Gordon <icculus@icculus.org>
Wed, 24 Aug 2005 16:51:29 +0000 (16:51 +0000)
Source/OpenGL_Windows.cpp

index 9d709dbc2685a0aa58e2feb7c00fe199997a5170..4c8326915dc57cb5e63dc1cd1fd4d9eed69c2ff5 100644 (file)
@@ -2679,10 +2679,6 @@ static bool load_png(const char *file_name, TGAImageRec &tex)
     if (!row_pointers)
         goto png_done;
 
-    retval = malloc(width * height * 4);
-    if (!retval)
-        goto png_done;
-
     if (!hasalpha)
     {
         png_byte *dst = tex.data;