ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | Wed Mar 10 17:42:43 2021 +0100| [c2fef8f16cf35c6eb58565d9e4bf25389637d850] | committer: Andreas Rheinhardt
dnn/dnn_backend_native_layer_conv2d: Check allocation Reviewed-by: Guo, Yejun <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2fef8f16cf35c6eb58565d9e4bf25389637d850 --- libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 2 ++ 1 file changed, 2 insertions(+) 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++){ _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
