diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e2990e45db..c2b46ae9f7 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -505,6 +505,7 @@ ebml_read_ascii (MatroskaDemuxContext *matroska, offset_t pos = url_ftell(pb); av_log(matroska->ctx, AV_LOG_ERROR, "Read error at pos. %"PRIu64" (0x%"PRIx64")\n", pos, pos); + av_free(*str); return AVERROR(EIO); } (*str)[size] = '\0';