summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c8
1 files changed, 4 insertions, 4 deletions
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;
}