diff mbox series

[FFmpeg-devel,7/7] avcodec/truemotion2: Don't check before freeing VLC

Message ID AS8P250MB074478CA1680592285F1C7278FEDA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit e9bbb39e94555f5bc8eb58e74c44dde87e28040a
Headers show
Series [FFmpeg-devel,1/7] avcodec/proresdec: Include required headers directly | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 8, 2023, 2:07 p.m. UTC
ff_vlc_free() is of course compatible with freeing
a blank VLC.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/truemotion2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Paul B Mahol Sept. 8, 2023, 6:11 p.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 5527fed958..366d8aefc1 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -222,8 +222,7 @@  out:
 static void tm2_free_codes(TM2Codes *code)
 {
     av_free(code->recode);
-    if (code->vlc.table)
-        ff_vlc_free(&code->vlc);
+    ff_vlc_free(&code->vlc);
 }
 
 static inline int tm2_get_token(GetBitContext *gb, TM2Codes *code)