fix: incomplete memory free during deinit

This commit is contained in:
2026-02-01 19:37:06 +03:00
parent cf98f22a0b
commit 19177494ea
2 changed files with 5 additions and 1 deletions

View File

@@ -96,6 +96,10 @@ esp_err_t zh_pcf8574_deinit(zh_pcf8574_handle_t *handle)
_interrupt_gpio = GPIO_NUM_MAX;
}
}
if (handle->system != NULL)
{
heap_caps_free(handle->system);
}
i2c_master_bus_rm_device(handle->dev_handle);
handle->is_initialized = false;
for (uint8_t i = 0; i < sizeof(_i2c_matrix); ++i)