diff options
author | Vinson Lee <[email protected]> | 2009-11-18 17:30:50 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-03 23:17:26 -0800 |
commit | efb582fde7d1375b21ecb28d8ba5690181a02a93 (patch) | |
tree | 84dba6ae55c97fcd40ce4862890e3d398b5151ec | |
parent | b210739aad1233ece4c12e93700768f331f3cac5 (diff) |
progs/tests: Fix memory leak in texdown.c if malloc fails.
(cherry picked from commit e3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f)
-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 7e460458325..e6881d39a0a 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; } |