lavfi/dnn_backend_openvino.c: Fix Memory Leak for RequestItem

Fix memory leak for RequestItem upon error while pushing to the
request_queue in the completion callback.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
pull/359/head
Shubhanshu Saxena 3 years ago committed by Guo Yejun
parent f9626d1065
commit 2df963b5fa
  1. 2
      libavfilter/dnn/dnn_backend_openvino.c

@ -293,6 +293,8 @@ static void infer_completion_callback(void *args)
request->inference_count = 0;
if (ff_safe_queue_push_back(requestq, request) < 0) {
ie_infer_request_free(&request->infer_request);
av_freep(&request);
av_log(ctx, AV_LOG_ERROR, "Failed to push back request_queue.\n");
return;
}

Loading…
Cancel
Save