From 0f729cebf4ff08b8d625c300a00be32241dbe27a Mon Sep 17 00:00:00 2001 From: Michel Hermier Date: Wed, 29 Dec 2021 13:34:27 +0100 Subject: [PATCH] LibVideo/VP9: Do not `null` guard calls to `free` --- Userland/Libraries/LibVideo/VP9/Parser.cpp | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/Userland/Libraries/LibVideo/VP9/Parser.cpp b/Userland/Libraries/LibVideo/VP9/Parser.cpp index ce923b366fa..47732aeafe8 100644 --- a/Userland/Libraries/LibVideo/VP9/Parser.cpp +++ b/Userland/Libraries/LibVideo/VP9/Parser.cpp @@ -24,32 +24,21 @@ Parser::Parser(Decoder& decoder) Parser::~Parser() { cleanup_tile_allocations(); - if (m_prev_segment_ids) - free(m_prev_segment_ids); + free(m_prev_segment_ids); } void Parser::cleanup_tile_allocations() { - if (m_skips) - free(m_skips); - if (m_tx_sizes) - free(m_tx_sizes); - if (m_mi_sizes) - free(m_mi_sizes); - if (m_y_modes) - free(m_y_modes); - if (m_segment_ids) - free(m_segment_ids); - if (m_ref_frames) - free(m_ref_frames); - if (m_interp_filters) - free(m_interp_filters); - if (m_mvs) - free(m_mvs); - if (m_sub_mvs) - free(m_sub_mvs); - if (m_sub_modes) - free(m_sub_modes); + free(m_skips); + free(m_tx_sizes); + free(m_mi_sizes); + free(m_y_modes); + free(m_segment_ids); + free(m_ref_frames); + free(m_interp_filters); + free(m_mvs); + free(m_sub_mvs); + free(m_sub_modes); } /* (6.1) */