nearest_color filter: was leaking malloc()ed buffers
authorTony Cook <tony@develop-help.com>
Tue, 23 Feb 2016 10:57:54 +0000 (21:57 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 23 Feb 2016 10:57:54 +0000 (21:57 +1100)
filters.im

index ee4f5d8..e247c9c 100644 (file)
@@ -1333,6 +1333,10 @@ i_nearest_color(i_img *im, int num, i_img_dim *xo, i_img_dim *yo, i_color *oval,
 
   i_nearest_color_foo(im, num, xo, yo, ival, dmeasure);
 
+  myfree(cmatch);
+  myfree(ival);
+  myfree(tval);
+
   return 1;
 }