diff options
author | Hsin-Yu Chao <hychao@chromium.org> | 2020-06-01 08:57:08 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-01 18:51:43 +0000 |
commit | e31dad29fa4fe04c08ca41680bbf2802b25b22c7 (patch) | |
tree | a77cbc76781d4becf4b8957530911793dadcf3e0 | |
parent | 1766efbca9be7cd2d24dacde95deb17532af808b (diff) | |
download | adhd-e31dad29fa4fe04c08ca41680bbf2802b25b22c7.tar.gz |
CRAS: unittest - Fix memory issue in bt_device_unittest
BUG=chromium:1087968
TEST=setup_board --board=amd64-generic --profile=asan
./build_packages --board=amd64-generic adhd
FEATURES=test emerge-amd64-generic adhd
Change-Id: I0ec9c7fa46c7cd0fd65ea8c7f595cbc0be4e599d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2224465
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r-- | cras/src/tests/bt_device_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cras/src/tests/bt_device_unittest.cc b/cras/src/tests/bt_device_unittest.cc index fd01a74f..a9213f3d 100644 --- a/cras/src/tests/bt_device_unittest.cc +++ b/cras/src/tests/bt_device_unittest.cc @@ -245,6 +245,7 @@ TEST_F(BtDeviceTestSuite, SetDeviceConnectedA2dpOnly) { cras_bt_device_a2dp_configured(device); /* Prepate the iodev created by cras_a2dp_start. */ + cras_bt_io_create_profile_ret = &bt_iodev1; cras_bt_device_append_iodev(device, &d1_, CRAS_BT_DEVICE_PROFILE_A2DP_SOURCE); cras_tm_create_timer_cb(NULL, cras_tm_create_timer_cb_data); @@ -285,6 +286,7 @@ TEST_F(BtDeviceTestSuite, SetDeviceConnectedHfpHspOnly) { cras_bt_device_audio_gateway_initialized(device); /* Prepate the iodev created by ag initialization. */ + cras_bt_io_create_profile_ret = &bt_iodev2; cras_bt_device_append_iodev(device, &d3_, CRAS_BT_DEVICE_PROFILE_HFP_AUDIOGATEWAY); |