avcodec/smacker: Remove redundant checks for NULL before freeing

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-07-26 09:13:16 +02:00
parent 3899adc298
commit b3e89ad646
1 changed files with 2 additions and 4 deletions

View File

@ -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);