History

libavfilter/dnn/dnn_backend_tf: Remove redundant av_freep() to avoid double free

Remove redundant av_freep() to avoid double free since task will be freed in dnn_free_model_tf() after the success of ff_queue_push_back().

Jiasheng Jiang committed 1 year ago

Commit 263e8191 parent 23655161 file · +0 −2Browse files

Unified · Split

libavfilter/dnn/dnn_backend_tf.c+0−2
@@ -833,14 +833,12 @@ static int dnn_execute_model_tf(const DNNModel *model, DNNExecBaseParams *exec_p · 832 unmodified lines
833 833
834 ret = extract_lltask_from_task(task, tf_model->lltask_queue);834 ret = extract_lltask_from_task(task, tf_model->lltask_queue);
835 if (ret != 0) {835 if (ret != 0) {
836 av_freep(&task);
837 av_log(ctx, AV_LOG_ERROR, "unable to extract last level task from task.\n");836 av_log(ctx, AV_LOG_ERROR, "unable to extract last level task from task.\n");
838 return ret;837 return ret;
839 }838 }
840 839
841 request = ff_safe_queue_pop_front(tf_model->request_queue);840 request = ff_safe_queue_pop_front(tf_model->request_queue);
842 if (!request) {841 if (!request) {
843 av_freep(&task);
844 av_log(ctx, AV_LOG_ERROR, "unable to get infer request.\n");842 av_log(ctx, AV_LOG_ERROR, "unable to get infer request.\n");
845 return AVERROR(EINVAL);843 return AVERROR(EINVAL);
846 }844 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t