Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubhanshu Saxena <shubhanshu.e01@gmail.com>2021-08-08 13:55:38 +0300
committerGuo Yejun <yejun.guo@intel.com>2021-08-10 17:27:27 +0300
commit371e5672f39284a8422574770f2505a61f73b683 (patch)
treef71964b5e3fa6b21e5496da0b652a7bf31b2839c /libavfilter
parent009b2e5b5ee602e2a27dc54077bf6fd46bdc9b9d (diff)
lavfi/dnn_backend_tf: Error Handling for tf_create_inference_request
This commit includes the check for the case when the newly created TFInferRequest is NULL. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/dnn/dnn_backend_tf.c3
1 files changed, 3 insertions, 0 deletions
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;