diff mbox series

[FFmpeg-devel,14/21] avcodec/smacker: Remove redundant checks for NULL before freeing

Message ID 20200801134704.3647-6-andreas.rheinhardt@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/8] avcodec/smacker: Remove write-only and unused variables
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 1, 2020, 1:46 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/smacker.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Paul B Mahol Aug. 1, 2020, 2:09 p.m. UTC | #1
On 8/1/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/smacker.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>

OK
diff mbox series

Patch

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