diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index 3dfadf888a..fb3f6f5ea6 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c @@ -135,6 +135,9 @@ static void tf_free_request(TFInferRequest *request) static TFInferRequest *tf_create_inference_request(void) { TFInferRequest *infer_request = av_malloc(sizeof(TFInferRequest)); + if (!infer_request) { + return NULL; + } infer_request->tf_outputs = NULL; infer_request->tf_input = NULL; infer_request->input_tensor = NULL;