diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 02c26e1a1dcbe8..bddf910a077c7a 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -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)) {