projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e12c9a6
)
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>
Thu, 19 Nov 2009 01:30:50 +0000
(17:30 -0800)
progs/tests/texdown.c
patch
|
blob
|
history
diff --git
a/progs/tests/texdown.c
b/progs/tests/texdown.c
index
7e46045
..
e6881d3
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;
}