[FFmpeg-cvslog] avcodec/smacker: Remove redundant checks for NULL before freeing
Andreas Rheinhardt
git at videolan.org
Fri Sep 18 03:32:02 EEST 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sun Jul 26 09:13:16 2020 +0200| [b3e89ad6466a2b2dd14a0a675aa97a61b81300b8] | committer: Andreas Rheinhardt
avcodec/smacker: Remove redundant checks for NULL before freeing
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3e89ad6466a2b2dd14a0a675aa97a61b81300b8
---
libavcodec/smacker.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 5e1b8c59ff..5e88e18aec 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -254,8 +254,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
err = 0;
error:
for (int i = 0; i < 2; i++) {
- if (vlc[i].table)
- ff_free_vlc(&vlc[i]);
+ ff_free_vlc(&vlc[i]);
av_free(h[i].bits);
av_free(h[i].lengths);
av_free(h[i].values);
@@ -732,8 +731,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
error:
for(i = 0; i < 4; i++) {
- if(vlc[i].table)
- ff_free_vlc(&vlc[i]);
+ ff_free_vlc(&vlc[i]);
av_free(h[i].bits);
av_free(h[i].lengths);
av_free(h[i].values);
More information about the ffmpeg-cvslog
mailing list