Skip to content

Commit

Permalink
Ensure pointers in AndroidDeviceControllerWrapper are init to nullptr (
Browse files Browse the repository at this point in the history
…#13557)

Fixes #13556

Tested locally on an Android device on the reported code path without a crash.
  • Loading branch information
g-coppock authored and pull[bot] committed Jul 26, 2023
1 parent 318e0f3 commit 5898007
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/controller/java/AndroidDeviceControllerWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel
bool mNodeIdRequested = false;

// These fields allow us to release the string/byte array memory later.
jstring ssidStr;
jstring passwordStr;
const char * ssid;
const char * password;
jbyteArray operationalDatasetBytes;
jbyte * operationalDataset;
jstring ssidStr = nullptr;
jstring passwordStr = nullptr;
const char * ssid = nullptr;
const char * password = nullptr;
jbyteArray operationalDatasetBytes = nullptr;
jbyte * operationalDataset = nullptr;

AndroidDeviceControllerWrapper(ChipDeviceControllerPtr controller) : mController(std::move(controller))
{
Expand Down

0 comments on commit 5898007

Please sign in to comment.