From 8e32b1f0963d01d4f5d4803eb721f162e0d58d9a Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 24 Feb 2015 14:07:54 +0200 Subject: libavformat: Use ffio_free_dyn_buf where applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/id3v2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavformat/id3v2.c') diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 3c5c06207f..b8994b2226 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -207,8 +207,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, case ID3v2_ENCODING_UTF16BOM: if ((left -= 2) < 0) { av_log(s, AV_LOG_ERROR, "Cannot read BOM value, input too short\n"); - avio_close_dyn_buf(dynbuf, dst); - av_freep(dst); + ffio_free_dyn_buf(&dynbuf); + *dst = NULL; return AVERROR_INVALIDDATA; } switch (avio_rb16(pb)) { @@ -218,8 +218,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, break; default: av_log(s, AV_LOG_ERROR, "Incorrect BOM value\n"); - avio_close_dyn_buf(dynbuf, dst); - av_freep(dst); + ffio_free_dyn_buf(&dynbuf); + *dst = NULL; *maxread = left; return AVERROR_INVALIDDATA; } -- cgit v1.2.3