avformat/id3v2: fix leak in chapter parsing
authorFredrik Hubinette <hubbe@google.com>
Tue, 7 Feb 2017 20:19:38 +0000 (12:19 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 26 Oct 2017 19:47:41 +0000 (21:47 +0200)
Reviewed-on: https://chromium-review.googlesource.com/439405
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/id3v2.c

index 9969d7a..85a31f7 100644 (file)
@@ -688,9 +688,9 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, const cha
     }
 
     if (decode_str(s, pb, 0, &dst, &len) < 0)
-        return;
+        goto end;
     if (len < 16)
-        return;
+        goto end;
 
     start = avio_rb32(pb);
     end   = avio_rb32(pb);