summaryrefslogtreecommitdiffstats
path: root/progs/tests/texdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/tests/texdown.c')
-rw-r--r--progs/tests/texdown.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/progs/tests/texdown.c b/progs/tests/texdown.c
index 7e460458325..92df01b83d2 100644
--- a/progs/tests/texdown.c
+++ b/progs/tests/texdown.c
@@ -162,7 +162,7 @@ MeasureDownloadRate(void)
const int image_bytes = align(w * h * BytesPerTexel(Format), ALIGN);
const int bytes = image_bytes * NR_TEXOBJ;
GLubyte *orig_texImage, *orig_getImage;
- GLubyte *texImage, *getImage;
+ GLubyte *texImage;
GLdouble t0, t1, time;
int count;
int i;
@@ -176,13 +176,14 @@ MeasureDownloadRate(void)
orig_getImage = (GLubyte *) malloc(image_bytes + ALIGN);
if (!orig_texImage || !orig_getImage) {
DownloadRate = 0.0;
+ free(orig_texImage);
+ free(orig_getImage);
return;
}
printf("alloc %p %p\n", orig_texImage, orig_getImage);
texImage = (GLubyte *)align((unsigned long)orig_texImage, ALIGN);
- getImage = (GLubyte *)align((unsigned long)orig_getImage, ALIGN);
for (i = 1; !(((unsigned long)texImage) & i); i<<=1)
;