Skip to content

Commit

Permalink
Move nulling out of CHIPDeviceController members closer to where they…
Browse files Browse the repository at this point in the history
… are shut down. (#7464)
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jul 9, 2021
1 parent a5c58dd commit 217b991
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ CHIP_ERROR DeviceController::Shutdown()
chip::Platform::Delete(mSystemLayer);
#endif // CONFIG_DEVICE_LAYER

mSystemLayer = nullptr;
mInetLayer = nullptr;

mState = State::NotInitialized;

// TODO(#6668): Some exchange has leak, shutting down ExchangeManager will cause a assert fail.
Expand All @@ -318,8 +321,6 @@ CHIP_ERROR DeviceController::Shutdown()
mSessionMgr->Shutdown();
}

mSystemLayer = nullptr;
mInetLayer = nullptr;
mStorageDelegate = nullptr;

ReleaseAllDevices();
Expand Down

0 comments on commit 217b991

Please sign in to comment.