From 014126d1487cfcde329e752fd0e8ccd7df0d046e Mon Sep 17 00:00:00 2001 From: mahesh Date: Tue, 6 May 2025 11:50:50 +0530 Subject: [PATCH] component/esp_matter: Fix memory corruption caused by double free --- components/esp_matter/esp_matter_core.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index e787d2865..c31ea1277 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -1826,8 +1826,6 @@ esp_err_t destroy(node_t *node, endpoint_t *endpoint) VerifyOrReturnError(endpoint_type, ESP_ERR_INVALID_STATE, ESP_LOGE(TAG, "endpoint %" PRIu16 "'s endpoint_type is NULL", current_endpoint->endpoint_id)); int cluster_count = endpoint_type->clusterCount; for (int cluster_index = 0; cluster_index < cluster_count; cluster_index++) { - /* Free attributes */ - esp_matter_mem_free((void *)endpoint_type->cluster[cluster_index].attributes); /* Free commands */ if (endpoint_type->cluster[cluster_index].acceptedCommandList) { esp_matter_mem_free((void *)endpoint_type->cluster[cluster_index].acceptedCommandList);