Skip to content

Commit fda7bb9

Browse files
committed
Merge pull request opencv#10938 from mshabunin:fix-static-issues-9
2 parents 546f1d9 + 7c855aa commit fda7bb9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

modules/dnn/src/layers/pooling_layer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ class PoolingLayerImpl : public PoolingLayer
323323

324324
#if CV_SIMD128
325325
const int* ofsptr = ofsbuf.empty() ? 0 : (const int*)&ofsbuf[0];
326+
if (poolingType == MAX && !compMaxIdx && !ofsptr)
327+
CV_Error(Error::StsBadArg, "ofsbuf should be initialized in this mode");
326328
v_float32x4 idx00(0.f, (float)stride_w, (float)(stride_w*2), (float)(stride_w*3));
327329
v_float32x4 ones = v_setall_f32(1.f);
328330
v_float32x4 idx_delta = v_setall_f32((float)(inp_width - kernel_w));

modules/imgcodecs/src/grfmt_tiff.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ bool TiffEncoder::writeLibTiff( const std::vector<Mat>& img_vec, const std::vect
775775
}
776776
default:
777777
{
778+
TIFFClose(pTiffHandle);
778779
return false;
779780
}
780781
}

0 commit comments

Comments
 (0)