diff options
author | Shubhanshu Saxena <shubhanshu.e01@gmail.com> | 2021-06-14 23:26:16 +0530 |
---|---|---|
committer | Guo Yejun <yejun.guo@intel.com> | 2021-06-18 21:26:50 +0800 |
commit | 2df963b5fa6784ac6f1413c9b1706c20da66e8df (patch) | |
tree | ae2a8166460873a420c3693139ab99e234c4a227 /libavfilter/dnn | |
parent | f9626d1065c43f1d51afe66bdf988b9f33729440 (diff) | |
download | ffmpeg-2df963b5fa6784ac6f1413c9b1706c20da66e8df.tar.gz |
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>
Diffstat (limited to 'libavfilter/dnn')
-rw-r--r-- | libavfilter/dnn/dnn_backend_openvino.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 709a772a4d..702c4fb9ee 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b/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; } |