diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-10 17:42:43 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-11 13:10:46 +0100 |
commit | c2fef8f16cf35c6eb58565d9e4bf25389637d850 (patch) | |
tree | 1f2730a1e0fb3ca6371f1aa03b43248b269384df | |
parent | d14ae74064a841d8a24aec78e9143fba01ce7003 (diff) | |
download | ffmpeg-c2fef8f16cf35c6eb58565d9e4bf25389637d850.tar.gz |
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>
-rw-r--r-- | libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c index 37834d09f4..f3e9ce3fd9 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c @@ -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++){ |