diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index 3a1ed7250af527..e00e3b8d65576d 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -186,7 +186,7 @@ class MockInteractionModelApp : public chip::app::InteractionModelDelegate, gLastCommandResult = TestCommandResult::kFailure; printf("CommandResponseError happens with %" CHIP_ERROR_FORMAT, aError.Format()); } - void OnDone(chip::app::CommandSender * apCommandSender) override {} + void OnDone(chip::app::CommandSender * apCommandSender) override { delete apCommandSender; } void OnResponse(const chip::app::WriteClient * apWriteClient, const chip::app::ConcreteAttributePath & path, chip::app::StatusIB status) override @@ -445,6 +445,10 @@ CHIP_ERROR EstablishSecureSession() { printf("Establish secure session succeeded\n"); } + if (testSecurePairingSecret) + { + chip::Platform::Delete(testSecurePairingSecret); + } return err; } diff --git a/src/messaging/tests/echo/echo_requester.cpp b/src/messaging/tests/echo/echo_requester.cpp index 570b182f4e7f7e..c94c43ffd42669 100644 --- a/src/messaging/tests/echo/echo_requester.cpp +++ b/src/messaging/tests/echo/echo_requester.cpp @@ -180,6 +180,10 @@ CHIP_ERROR EstablishSecureSession() { printf("Establish secure session succeeded\n"); } + if (testSecurePairingSecret) + { + chip::Platform::Delete(testSecurePairingSecret); + } return err; }