mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Merge branch 'fix/memory-poisoining' into 'main'
Fix: Memory poisoning due to double free See merge request app-frameworks/esp-matter!1135
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user