[FFmpeg-cvslog] avfilter/vf_pullup: fix memleak of metrics for last PullupField
Paul B Mahol
git at videolan.org
Wed Sep 18 13:56:51 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Sep 18 11:49:58 2013 +0000| [fe5b7612c0c9d1cf32c52a1edea993d6c40bdc25] | committer: Paul B Mahol
avfilter/vf_pullup: fix memleak of metrics for last PullupField
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe5b7612c0c9d1cf32c52a1edea993d6c40bdc25
---
libavfilter/vf_pullup.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index f8f888c..a81bc56 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -718,17 +718,17 @@ static av_cold void uninit(AVFilterContext *ctx)
int i;
f = s->head;
- do {
- if (!f)
- break;
-
+ while (f) {
av_free(f->diffs);
av_free(f->combs);
av_free(f->vars);
+ if (f == s->last) {
+ av_freep(&s->last);
+ break;
+ }
f = f->next;
av_freep(&f->prev);
- } while (f != s->last);
- av_freep(&s->last);
+ };
for (i = 0; i < FF_ARRAY_ELEMS(s->buffers); i++) {
av_freep(&s->buffers[i].planes[0]);
More information about the ffmpeg-cvslog
mailing list