Skip to content

Commit

Permalink
Fix crash caused by uninitialized variable (#7230)
Browse files Browse the repository at this point in the history
* Fix crash caused by uninitialized variable

* Initialize remaining member variables that are pointers

* changes by restyler
  • Loading branch information
bluebin14 authored Jun 2, 2021
1 parent bad5ec1 commit 7f03db9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/controller/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,23 +272,23 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate,
bool mPairedDevicesInitialized;

NodeId mLocalDeviceId;
DeviceTransportMgr * mTransportMgr;
SecureSessionMgr * mSessionMgr;
Messaging::ExchangeManager * mExchangeMgr;
secure_channel::MessageCounterManager * mMessageCounterManager;
PersistentStorageDelegate * mStorageDelegate;
DeviceControllerInteractionModelDelegate * mDefaultIMDelegate;
DeviceTransportMgr * mTransportMgr = nullptr;
SecureSessionMgr * mSessionMgr = nullptr;
Messaging::ExchangeManager * mExchangeMgr = nullptr;
secure_channel::MessageCounterManager * mMessageCounterManager = nullptr;
PersistentStorageDelegate * mStorageDelegate = nullptr;
DeviceControllerInteractionModelDelegate * mDefaultIMDelegate = nullptr;
#if CHIP_DEVICE_CONFIG_ENABLE_MDNS
DeviceAddressUpdateDelegate * mDeviceAddressUpdateDelegate = nullptr;
// TODO(cecille): Make this configuarable.
static constexpr int kMaxCommissionableNodes = 10;
Mdns::CommissionableNodeData mCommissionableNodes[kMaxCommissionableNodes];
#endif
Inet::InetLayer * mInetLayer;
Inet::InetLayer * mInetLayer = nullptr;
#if CONFIG_NETWORK_LAYER_BLE
Ble::BleLayer * mBleLayer = nullptr;
#endif
System::Layer * mSystemLayer;
System::Layer * mSystemLayer = nullptr;

uint16_t mListenPort;
uint16_t GetInactiveDeviceIndex();
Expand Down

0 comments on commit 7f03db9

Please sign in to comment.