A fix for TimeServ's memory leak report: 'gl_draw.c: 3507 zone difference is 2600'

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1340 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-09-17 16:48:47 +00:00
parent 2d52134471
commit 3e7a823089

View file

@ -3504,10 +3504,6 @@ int GL_LoadTextureFB (char *identifier, int width, int height, qbyte *data, qboo
return glt->texnum; return glt->texnum;
} }
glt = BZ_Malloc(sizeof(*glt)+sizeof(bucket_t));
glt->next = gltextures;
gltextures = glt;
for (i = 0; i < width*height; i++) for (i = 0; i < width*height; i++)
if (data[i] > 255-vid.fullbright) if (data[i] > 255-vid.fullbright)
break; break;
@ -3515,6 +3511,10 @@ int GL_LoadTextureFB (char *identifier, int width, int height, qbyte *data, qboo
if (i == width*height) if (i == width*height)
return 0; //none found, don't bother uploading. return 0; //none found, don't bother uploading.
glt = BZ_Malloc(sizeof(*glt)+sizeof(bucket_t));
glt->next = gltextures;
gltextures = glt;
strcpy (glt->identifier, identifier); strcpy (glt->identifier, identifier);
glt->texnum = texture_extension_number; glt->texnum = texture_extension_number;
glt->width = width; glt->width = width;