dnn/dnn_backend_native_layer_conv2d: Check allocation

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-03-10 17:42:43 +01:00
parent d14ae74064
commit c2fef8f16c
1 changed files with 2 additions and 0 deletions

View File

@ -228,6 +228,8 @@ int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_opera
#if HAVE_PTHREAD_CANCEL
thread_param = av_malloc_array(thread_num, sizeof(*thread_param));
if (!thread_param)
return DNN_ERROR;
thread_stride = (height - pad_size * 2) / thread_num;
//create threads
for (int i = 0; i < thread_num; i++){