[FFmpeg-cvslog] vf_sab: Fix memleak
Michael Niedermayer
git at videolan.org
Mon Jun 10 22:07:35 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 10 22:00:43 2013 +0200| [d3e89f2641ba5a2c4d371bb955b3f1d0cc9c58b2] | committer: Michael Niedermayer
vf_sab: Fix memleak
Fixes CID1030353
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3e89f2641ba5a2c4d371bb955b3f1d0cc9c58b2
---
libavfilter/vf_sab.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c
index 82e9ccd..1d970fa 100644
--- a/libavfilter/vf_sab.c
+++ b/libavfilter/vf_sab.c
@@ -181,8 +181,10 @@ static int open_filter_param(FilterParam *f, int width, int height, unsigned int
f->dist_width = vec->length;
f->dist_linesize = FFALIGN(vec->length, 8);
f->dist_coeff = av_malloc(f->dist_width * f->dist_linesize * sizeof(*f->dist_coeff));
- if (!f->dist_coeff)
+ if (!f->dist_coeff) {
+ sws_freeVec(vec);
return AVERROR(ENOMEM);
+ }
for (y = 0; y < vec->length; y++) {
for (x = 0; x < vec->length; x++) {
More information about the ffmpeg-cvslog
mailing list