dropbox / lepton

Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
Apache License 2.0
5.01k stars 355 forks source link

close opened file descriptors properly #60

Closed bryonglodencissp closed 8 years ago

bryonglodencissp commented 8 years ago

[src/lepton/jpgcoder.cc:1273]: (error) Resource leak: fp

Calling fclose() will ensure the file descriptor is properly disposed of and output buffers flushed so the data written to the file will be present in the file on disk.

Found by https://github.com/bryongloden/cppcheck