Skip to content

Commit

Permalink
Merge branch 'bugfix/alarm_not_free_when_a2dp_deinit_v5.1' into 'rele…
Browse files Browse the repository at this point in the history
…ase/v5.1'

bugfix/Fixed the issue of alarm leak (v5.1)

See merge request espressif/esp-idf!24351
  • Loading branch information
jack0c committed Jul 5, 2023
2 parents 425b660 + 4ce9023 commit d682fbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/bt/host/bluedroid/bta/av/bta_av_act.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,8 +1861,8 @@ void bta_av_dereg_comp(tBTA_AV_DATA *p_data)
bta_sys_remove_uuid(UUID_SERVCLASS_VIDEO_SOURCE);
}

/* make sure that the timer is not active */
bta_sys_stop_timer(&p_scb->timer);
/* free the delay timer for AVRC CT */
bta_sys_free_timer(&p_scb->timer);
list_free(p_scb->a2d_list);
p_scb->a2d_list = NULL;
utl_freebuf((void **)&p_cb->p_scb[p_scb->hdi]);
Expand Down
6 changes: 3 additions & 3 deletions components/bt/host/bluedroid/bta/hf_ag/bta_ag_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,11 @@ void bta_ag_scb_dealloc(tBTA_AG_SCB *p_scb)

APPL_TRACE_DEBUG("bta_ag_scb_dealloc %d", bta_ag_scb_to_idx(p_scb));
/* stop timers */
bta_sys_stop_timer(&p_scb->act_timer);
bta_sys_free_timer(&p_scb->act_timer);
#if (BTM_WBS_INCLUDED == TRUE)
bta_sys_stop_timer(&p_scb->cn_timer);
bta_sys_free_timer(&p_scb->cn_timer);
#endif
bta_sys_stop_timer(&p_scb->colli_timer);
bta_sys_free_timer(&p_scb->colli_timer);

/* initialize control block */
memset(p_scb, 0, sizeof(tBTA_AG_SCB));
Expand Down

0 comments on commit d682fbe

Please sign in to comment.