can be memory leak in case of exception. Please, use `cv::AutoBuffer` instead of manually `fastMalloc/fastFree`