Module: Mesa Branch: mesa_7_7_branch Commit: e3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f
Author: Vinson Lee <[email protected]> Date: Wed Nov 18 17:30:50 2009 -0800 progs/tests: Fix memory leak in texdown.c if malloc fails. --- 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 7e46045..e6881d3 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; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
