projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b210739
)
progs/tests: Fix memory leak in texdown.c if malloc fails.
author
Vinson Lee
<vlee@vmware.com>
Thu, 19 Nov 2009 01:30:50 +0000
(17:30 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 4 Dec 2009 07:17:26 +0000
(23:17 -0800)
(cherry picked from commit
e3cfd78969cd4a94fc83a5d6fb2f33730cc4e70f
)
progs/tests/texdown.c
patch
|
blob
|
history
diff --git
a/progs/tests/texdown.c
b/progs/tests/texdown.c
index 7e46045832545f9fe43c7a08ddd334a0ad709bec..e6881d39a0a7ec4e59b0f478ca9b6beb2f27bd84 100644
(file)
--- 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;
}