Commit d861d8c
committed
[nrf fromtree] Bluetooth: Host: Fix issue where uninitialized value was used
This change makes sure that when a call to `bt_id_set_scan_own_addr` is
sucessful, i.e., the return value is 0, the `own_addr_type` will
be set by the `bt_id_set_scan_own_addr`.
Not setting the `own_addr_type` in a successful call to
`bt_id_set_scan_own_addr` causes, for example,
the `start_le_scan_ext` method in `scan.c` to use an
uninitialized `own_addr_type`.
Eventually this results in an unexpected failure further down in
`start_le_scan_ext`, when sending HCI command to controller with
an uninitialized `own_addr_type`.
Signed-off-by: Erik Sandgren <[email protected]>
(cherry picked from commit 5f59b35)1 parent 187d590 commit d861d8c
File tree
2 files changed
+7
-9
lines changed- subsys/bluetooth/host
- tests/bluetooth/host/id/bt_id_set_scan_own_addr/src
2 files changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
1788 | 1795 | | |
1789 | 1796 | | |
1790 | 1797 | | |
| |||
1794 | 1801 | | |
1795 | 1802 | | |
1796 | 1803 | | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
1803 | 1804 | | |
1804 | 1805 | | |
1805 | 1806 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | | - | |
135 | | - | |
136 | 133 | | |
0 commit comments