Fixes memleak Fixes part of CID1197065
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -1369,8 +1369,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 1368 unmodified lines | ||
| 1369 | 1369 | |
| 1370 | 1370 | if (!s->background) { |
| 1371 | 1371 | ret = draw_background(ctx); |
| 1372 | − if (ret < 0) | |
| 1372 | + if (ret < 0) { | |
| 1373 | + av_frame_free(&out); | |
| 1373 | 1374 | return ret; |
| 1375 | + } | |
| 1374 | 1376 | s->background = 1; |
| 1375 | 1377 | } |
| 1376 | 1378 | for (y = 0; y < outlink->h; y++) { |