From 7a33d891b2dc1703dce16b3358b19a985cea0b06 Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Tue, 30 Jan 2024 22:30:32 -0800 Subject: [PATCH] modules/py_fir: Fix mlx data root pointer. --- src/omv/modules/py_fir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/omv/modules/py_fir.c b/src/omv/modules/py_fir.c index ca7e746fc..6ff15d647 100644 --- a/src/omv/modules/py_fir.c +++ b/src/omv/modules/py_fir.c @@ -309,7 +309,6 @@ static mp_obj_t py_fir_deinit() { #if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1)) if (fir_mlx_data != NULL) { - xfree(fir_mlx_data); fir_mlx_data = NULL; } #endif @@ -1161,5 +1160,8 @@ void py_fir_init0() { py_fir_deinit(); } +#if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1)) +MP_REGISTER_ROOT_POINTER(void *fir_mlx_data); +#endif MP_REGISTER_MODULE(MP_QSTR_fir, fir_module); #endif