From bffad70c6658f722cbed4b1f06cca89c9de12cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 3 Feb 2011 11:31:41 +0100 Subject: [PATCH] Remove forgotten if (p) av_free(p) forms Signed-off-by: Mans Rullgard (cherry picked from commit 290849e2a4e76484f1a34506782e8dbfe7bbe406) --- libavfilter/defaults.c | 2 +- libavformat/avidec.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index 98339b6f30..9f245c306f 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -126,7 +126,7 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int per return ref; fail: - if (ref && ref->audio) + if (ref) av_free(ref->audio); av_free(ref); av_free(samples); diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d8d4726ae9..27a9d1fbc3 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1354,8 +1354,7 @@ static int avi_read_close(AVFormatContext *s) } } - if (avi->dv_demux) - av_free(avi->dv_demux); + av_free(avi->dv_demux); return 0; }