Fixed several issues found by static analysis

This commit is contained in:
Maksim Shabunin
2017-06-28 16:26:55 +03:00
parent bbb14d3746
commit a769d69a9d
35 changed files with 113 additions and 66 deletions
+4 -6
View File
@@ -208,9 +208,12 @@ bool ExrDecoder::readData( Mat& img )
xstep = m_native_depth ? 4 : 1;
AutoBuffer<char> copy_buffer;
if( !m_native_depth || (!color && m_iscolor ))
{
buffer = (char *)new float[ m_width * 3 ];
copy_buffer.allocate(sizeof(float) * m_width * 3);
buffer = copy_buffer;
ystep = 0;
}
else
@@ -388,11 +391,6 @@ bool ExrDecoder::readData( Mat& img )
close();
if( !m_native_depth || (!color && m_iscolor ))
{
delete[] buffer;
}
return result;
}