progs/tests: Fix memory leak in texdown.c if malloc fails.

This commit is contained in:
Vinson Lee 2009-11-18 17:30:50 -08:00
parent e12c9a6f3a
commit e3cfd78969

View file

@ -176,6 +176,8 @@ MeasureDownloadRate(void)
orig_getImage = (GLubyte *) malloc(image_bytes + ALIGN);
if (!orig_texImage || !orig_getImage) {
DownloadRate = 0.0;
free(orig_texImage);
free(orig_getImage);
return;
}