diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-18 17:30:50 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-11-18 17:30:50 -0800 |
commit | e3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f (patch) | |
tree | dd75099b6d19cffa5d194f83205fde507d052050 | |
parent | e12c9a6f3af6ec10cbd2e5cd2a6b90056652a2c0 (diff) |
progs/tests: Fix memory leak in texdown.c if malloc fails.
-rw-r--r-- | progs/tests/texdown.c | 2 |
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; } |