RoboCup-SSL / ssl-vision

Shared Vision System For The RoboCup Small Size League
GNU General Public License v3.0
88 stars 109 forks source link

Fix(GlobalV4Linstance::getImageFromJPEG): remove memory leak #191

Closed jpspm closed 2 years ago

jpspm commented 2 years ago

Co-authored-by: felipemartins96 fbm2@cin.ufpe.br

Using MJPEG and V4L modules, we found a memory leak in this function. the struct jpeg_decompress_struct dinfo, has several pointers and allocates them in each iteration, but the added line does a free correctly and frees the memory after the conversion is finished