Fix memory leak in endpoint destroy

This commit is contained in:
mahesh
2025-04-04 12:23:57 +05:30
committed by esp
parent 71c8a2fc4d
commit e4853b4e08
@@ -2078,6 +2078,10 @@ esp_err_t destroy(node_t *node, endpoint_t *endpoint)
}
/* Free */
if (current_endpoint->identify != NULL) {
chip::Platform::Delete(current_endpoint->identify);
current_endpoint->identify = NULL;
}
esp_matter_mem_free(current_endpoint);
return ESP_OK;
}