From 12cd138030ae3ad2032fdd4546f50b68235e1589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 3 Feb 2021 11:13:58 -0300 Subject: [PATCH] AP_HAL: Remove pointer check before delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_HAL/Device.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_HAL/Device.h b/libraries/AP_HAL/Device.h index e37d8cb537..5402bd3d5c 100644 --- a/libraries/AP_HAL/Device.h +++ b/libraries/AP_HAL/Device.h @@ -78,9 +78,7 @@ public: virtual ~Device() { - if (_checked.regs != nullptr) { - delete[] _checked.regs; - } + delete[] _checked.regs; } /*