Bluetooth: Controller: Fix incorrect auto variable init
Coverity analysis discovered NULL pointer being dereferenced when passing a auto variable. The variable is now correctly assigned with address of a valid default value variable. As per design, the dereferencing will not happen as the master role does not use the passed parameter only slave role uses it to prepare the connection parameter request PDU. Change-id: I3f8519b23a83cb8c50c7fba81810eff7737ff74a Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
7b1c042b02
commit
94a425429c
1 changed files with 4 additions and 1 deletions
|
@ -3287,9 +3287,12 @@ static void sched_free_win_offset_calc(struct connection *conn_curr,
|
|||
static void work_sched_free_win_offset_calc(void *params)
|
||||
{
|
||||
struct connection *conn = (struct connection *)params;
|
||||
uint32_t *ticks_to_offset_next = 0;
|
||||
uint32_t ticks_to_offset_default = 0;
|
||||
uint32_t *ticks_to_offset_next;
|
||||
uint8_t offset_max = 6;
|
||||
|
||||
ticks_to_offset_next = &ticks_to_offset_default;
|
||||
|
||||
if (conn->role.slave.role != 0) {
|
||||
conn->llcp.connection_update.ticks_to_offset_next =
|
||||
conn->role.slave.ticks_to_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue