On Thu, 6 Aug 2020 01:33:57 +0200 "Andreas Rheinhardt" <andreas.rheinha...@gmail.com> wrote:
> > static void load_sb_block(AVFormatContext *s, VividasDemuxContext *viv, > unsigned expected_size) > @@ -608,7 +606,7 @@ static int viv_read_header(AVFormatContext *s) > ret = track_index(viv, s, buf, v); > av_free(buf); > if (ret < 0) > - return ret; > + goto fail; > > viv->sb_offset = avio_tell(pb); > if (viv->n_sb_blocks > 0) { > @@ -619,6 +617,9 @@ static int viv_read_header(AVFormatContext *s) > } > > return 0; > +fail: > + av_freep(&viv->sb_blocks); > + return ret; > } Nit: Considering there's only one `goto fail`, wouldn't it be better to just av_freep and return immediately instead? Otherwise, all lgtm. Zane _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".