From f8241f144cd0ad829f35ff2b4516c64de01dd158 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 13 Aug 2020 11:54:12 -0400 Subject: [PATCH] hmc5883: cleanup device interface on destruction --- src/drivers/magnetometer/hmc5883/HMC5883.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/magnetometer/hmc5883/HMC5883.cpp b/src/drivers/magnetometer/hmc5883/HMC5883.cpp index ddad7213b8..6754d0f480 100644 --- a/src/drivers/magnetometer/hmc5883/HMC5883.cpp +++ b/src/drivers/magnetometer/hmc5883/HMC5883.cpp @@ -58,6 +58,8 @@ HMC5883::~HMC5883() perf_free(_comms_errors); perf_free(_range_errors); perf_free(_conf_errors); + + delete _interface; } int HMC5883::init()