From a1545b18e41b8ee64d65219a6dfe120f4894c6d8 Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 4 Apr 2025 12:23:57 +0530 Subject: [PATCH 1/2] Fix memory leak in endpoint destroy --- components/esp_matter/esp_matter_core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index 929fc8a22..94c0d0189 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -1949,6 +1949,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; } From 64da8b857182c35b0b5b5db8adebf3d663cc6365 Mon Sep 17 00:00:00 2001 From: yiwenxiu Date: Tue, 10 Dec 2024 16:03:34 +0800 Subject: [PATCH 2/2] ci: change wlan to ethernet --- examples/pytest_esp_matter_light.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/pytest_esp_matter_light.py b/examples/pytest_esp_matter_light.py index 62ea652c3..140deb64b 100644 --- a/examples/pytest_esp_matter_light.py +++ b/examples/pytest_esp_matter_light.py @@ -9,6 +9,9 @@ import subprocess import netifaces from typing import Tuple from pytest_embedded import Dut +import os +import yaml + CURRENT_DIR_LIGHT = str(pathlib.Path(__file__).parent)+'/light' CHIP_TOOL_EXE = str(pathlib.Path(__file__).parent)+ '/../connectedhomeip/connectedhomeip/out/host/chip-tool' @@ -98,9 +101,20 @@ def test_matter_commissioning_c6(dut:Dut) -> None: # get the host interface name def get_host_interface_name() -> str: - interfaces = netifaces.interfaces() - interface_name = [s for s in interfaces if 'wl' in s][0] - return str(interface_name) + home_dir = os.path.expanduser("~") + config_path = os.path.join(home_dir, "config", "env_config.yml") + if os.path.exists(config_path): + with open(config_path, 'r') as file: + config = yaml.safe_load(file) + interface_name = config.get("interface_name") + if interface_name: + return str(interface_name) + else: + print("Warning: Configuration file found but 'interface_name' is not defined.") + + if "eth1" in netifaces.interfaces(): + return "eth1" + raise Exception("No valid network interface found. Please ensure 'eth1' exists or configure 'interface_name' in config/env_config file.") # reset host interface