diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 138af750d4aa49..8c66429cb1799d 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -938,7 +938,7 @@ void DeviceCommissioner::RendezvousCleanup(CHIP_ERROR status) { FreeRendezvousSession(); - if (mDeviceBeingCommissioned != nullptr) + if (mDeviceBeingCommissioned != nullptr && mIsIPRendezvous) { // Release the commissionee device. For BLE, this is stored, // for IP commissioning, we have taken a reference to the