Fixes: CID1559901 Resource leak
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -237,8 +237,10 @@ static int output_frame(AVFilterLink *outlink) · 236 unmodified lines | |||
| 237 | 237 | ||
| 238 | // set correct timestamps and props as long as there is proper input | 238 | // set correct timestamps and props as long as there is proper input |
| 239 | ret = av_frame_copy_props(dst, s->input); | 239 | ret = av_frame_copy_props(dst, s->input); |
| 240 | if (ret < 0) | 240 | if (ret < 0) { |
| 241 | av_frame_free(&dst); | ||
| 241 | return ret; | 242 | return ret; |
| 243 | } | ||
| 242 | 244 | ||
| 243 | // discard frame at the top of the list since it has been fully processed | 245 | // discard frame at the top of the list since it has been fully processed |
| 244 | list_remove_head(s); | 246 | list_remove_head(s); |