1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Fix a potential bug of ocl::CannyBuf.

The program would crash if release is called twice.
This commit is contained in:
peng xiao
2013-04-12 15:43:33 +08:00
parent 7586145235
commit 4f328d8388
+5 -1
View File
@@ -112,7 +112,11 @@ void cv::ocl::CannyBuf::release()
mapBuf.release();
trackBuf1.release();
trackBuf2.release();
openCLFree(counter);
if(counter)
{
openCLFree(counter);
counter = NULL;
}
}
namespace cv