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

Showing the changes to libavfilter (1 of 1 file). Show all

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
833833
834834 ret = extract_lltask_from_task(task, tf_model->lltask_queue);
835835 if (ret != 0) {
836− av_freep(&task);
837836 av_log(ctx, AV_LOG_ERROR, "unable to extract last level task from task.\n");
838837 return ret;
839838 }
840839
841840 request = ff_safe_queue_pop_front(tf_model->request_queue);
842841 if (!request) {
843− av_freep(&task);
844842 av_log(ctx, AV_LOG_ERROR, "unable to get infer request.\n");
845843 return AVERROR(EINVAL);
846844 }

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