summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-18 17:30:50 -0800
committerVinson Lee <vlee@vmware.com>2009-11-18 17:30:50 -0800
commite3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f (patch)
treedd75099b6d19cffa5d194f83205fde507d052050 /progs
parente12c9a6f3af6ec10cbd2e5cd2a6b90056652a2c0 (diff)
progs/tests: Fix memory leak in texdown.c if malloc fails.
Diffstat (limited to 'progs')
-rw-r--r--progs/tests/texdown.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/progs/tests/texdown.c b/progs/tests/texdown.c
index 7e46045832..e6881d39a0 100644
--- a/progs/tests/texdown.c
+++ b/progs/tests/texdown.c
@@ -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;
}