aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_pan.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-05-10 13:45:07 +0200
committerPaul B Mahol <onemda@gmail.com>2023-05-10 13:56:34 +0200
commitffd275a7e065e1e7fbf57c9dbbb2955dd72b8481 (patch)
tree701311ddd956adf0d8b3130f4d179d3d8f0e0053 /libavfilter/af_pan.c
parenta4abe37fb546082b83f38254f2c22654ff2ff45d (diff)
downloadffmpeg-ffd275a7e065e1e7fbf57c9dbbb2955dd72b8481.tar.gz
avfilter/af_pan: fix leaks on error case
Diffstat (limited to 'libavfilter/af_pan.c')
-rw-r--r--libavfilter/af_pan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 4672648d46..bb33ab10c0 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -385,8 +385,11 @@ FF_DISABLE_DEPRECATION_WARNINGS
outsamples->channels = outlink->ch_layout.nb_channels;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- if ((ret = av_channel_layout_copy(&outsamples->ch_layout, &outlink->ch_layout)) < 0)
+ if ((ret = av_channel_layout_copy(&outsamples->ch_layout, &outlink->ch_layout)) < 0) {
+ av_frame_free(&outsamples);
+ av_frame_free(&insamples);
return ret;
+ }
ret = ff_filter_frame(outlink, outsamples);
av_frame_free(&insamples);