mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
009b2e5b5e
commit
371e5672f3
@ -135,6 +135,9 @@ static void tf_free_request(TFInferRequest *request)
|
|||||||
static TFInferRequest *tf_create_inference_request(void)
|
static TFInferRequest *tf_create_inference_request(void)
|
||||||
{
|
{
|
||||||
TFInferRequest *infer_request = av_malloc(sizeof(TFInferRequest));
|
TFInferRequest *infer_request = av_malloc(sizeof(TFInferRequest));
|
||||||
|
if (!infer_request) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
infer_request->tf_outputs = NULL;
|
infer_request->tf_outputs = NULL;
|
||||||
infer_request->tf_input = NULL;
|
infer_request->tf_input = NULL;
|
||||||
infer_request->input_tensor = NULL;
|
infer_request->input_tensor = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user