forked from FFmpeg/FFmpeg
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>
This commit is contained in:
parent
f9626d1065
commit
2df963b5fa
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue