projects
/
imager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e3e50e
)
getcolorusage() leaked in i_get_anonymous_color_histo() on too many colors
author
Tony Cook
<tony@develop-help.com>
Sun, 21 Feb 2016 02:31:16 +0000
(13:31 +1100)
committer
Tony Cook
<tony@develop-help.com>
Sun, 21 Feb 2016 02:31:16 +0000
(13:31 +1100)
i_get_anonymous_color_histo() leaked the sample buffer.
image.c
patch
|
blob
|
blame
|
history
diff --git
a/image.c
b/image.c
index 6e1c58e02b81d33f314ec6fbc0777d13d17db3f2..cbd1b38a0f3bfc2cb719cdfc0df611c2f53942da 100644
(file)
--- a/
image.c
+++ b/
image.c
@@
-1302,7
+1302,8
@@
i_get_anonymous_color_histo(i_img *im, unsigned int **col_usage, int maxc) {
colorcnt += octt_add(ct, samp[x], samp[x+1], samp[x+2]);
x += 3;
if (colorcnt > maxc) {
- octt_delete(ct);
+ octt_delete(ct);
+ myfree(samp);
return -1;
}
}