Fix valgrind error
This patch fixes following valgrind error message:
==5000== Thread 6 bt_jni_workqueue:
==5000== Conditional jump or move depends on uninitialised value(s)
==5000== at 0x4353C7:
bluetooth::LowEnergyClient::ScanResultCallback(bluetooth::hal::BluetoothGattInterface*,
bt_bdaddr_t const&, int, unsigned char*) (low_energy_client.cpp:573)
==5000== by 0x443BBB: bluetooth::hal::(anonymous
namespace)::ScanResultCallback(bt_bdaddr_t*, int, unsigned char*)
(bluetooth_gatt_interface.cpp:91)
Bug: 28113318
Change-Id: Ide82c6a7f68f6bbe427f12ca353d62f1d999d0ae
diff --git a/service/low_energy_client.cpp b/service/low_energy_client.cpp
index cc568de..aae554c 100644
--- a/service/low_energy_client.cpp
+++ b/service/low_energy_client.cpp
@@ -313,7 +313,8 @@
adv_started_(false),
adv_start_callback_(nullptr),
adv_stop_callback_(nullptr),
- scan_started_(false) {
+ scan_started_(false),
+ delegate_(nullptr) {
}
LowEnergyClient::~LowEnergyClient() {