diff --git a/modules/imgcodecs/src/grfmt_hdr.cpp b/modules/imgcodecs/src/grfmt_hdr.cpp index 3a18b5bbeb..c9fec94aa3 100644 --- a/modules/imgcodecs/src/grfmt_hdr.cpp +++ b/modules/imgcodecs/src/grfmt_hdr.cpp @@ -59,6 +59,9 @@ HdrDecoder::HdrDecoder() HdrDecoder::~HdrDecoder() { + if(file) { + fclose(file); + } } size_t HdrDecoder::signatureLength() const