History

avfilter/af_channelsplit: fix memory leak

LuMingYin committed 2 years ago

Commit 5e380bc1 parent db09f1a1 file · +3 −1Browse files

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

Unified · Split

libavfilter/af_channelsplit.c+3−1
@@ -163,8 +163,10 @@ static int filter_frame(AVFilterLink *outlink, AVFrame *buf) · 162 unmodified lines
163163
164164 buf_out->data[0] = buf_out->extended_data[0] = buf_out->extended_data[s->map[i]];
165165 ret = av_channel_layout_from_mask(&buf_out->ch_layout, 1ULL << channel);
166− if (ret < 0)
166+ if (ret < 0) {
167+ av_frame_free(&buf_out);
167168 return ret;
169+ }
168170
169171 return ff_filter_frame(ctx->outputs[i], buf_out);
170172 }

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