From 19177494ea9377f002bda1b2d5582964d0069feb Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sun, 1 Feb 2026 19:37:06 +0300 Subject: [PATCH] fix: incomplete memory free during deinit --- version.txt | 2 +- zh_pcf8574.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 9183195..58073ef 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.4.0 \ No newline at end of file +2.4.1 \ No newline at end of file diff --git a/zh_pcf8574.c b/zh_pcf8574.c index 086f933..10d2574 100755 --- a/zh_pcf8574.c +++ b/zh_pcf8574.c @@ -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)