From a439f4167e45413d8bc4217289d2b74f785c6048 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 17 Jun 2024 11:46:31 -0700 Subject: [PATCH 1/2] Fix dandling pointer when AddDeviceEndpoint failed --- examples/bridge-app/linux/main.cpp | 3 +++ examples/fabric-bridge-app/linux/DeviceManager.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index a894b5d0150ca6..f8a28516e17886 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -278,6 +278,7 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span Date: Mon, 17 Jun 2024 12:57:01 -0700 Subject: [PATCH 2/2] Remove code never be excuted --- examples/bridge-app/linux/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index f8a28516e17886..699a87fa8c7938 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -287,8 +287,6 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span