Merge branch 'bugfix/btdm_mem_leak_v3.2' into 'release/v3.2'
components/bt: Fix memory leak about rfcomm See merge request espressif/esp-idf!5623
This commit is contained in:
commit
8fdea83505
3 changed files with 36 additions and 0 deletions
|
@ -366,4 +366,9 @@ void BTE_DeinitStack(void)
|
|||
#if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE)
|
||||
A2D_Deinit();
|
||||
#endif
|
||||
|
||||
#if (defined(RFCOMM_INCLUDED) && RFCOMM_INCLUDED == TRUE)
|
||||
RFCOMM_Deinit();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -623,6 +623,17 @@ extern int PORT_Test (UINT16 handle, UINT8 *p_data, UINT16 len);
|
|||
*******************************************************************************/
|
||||
extern void RFCOMM_Init (void);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function RFCOMM_Deinit
|
||||
**
|
||||
** Description This function is called to deinitialize the control block
|
||||
** for this layer.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void RFCOMM_Deinit(void);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
|
|
@ -1729,6 +1729,26 @@ void RFCOMM_Init (void)
|
|||
rfcomm_l2cap_if_init ();
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function RFCOMM_Deinit
|
||||
**
|
||||
** Description This function is called to deinitialize the control block
|
||||
** for this layer.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void RFCOMM_Deinit(void)
|
||||
{
|
||||
#if RFC_DYNAMIC_MEMORY == TRUE
|
||||
if (rfc_cb_ptr){
|
||||
osi_free(rfc_cb_ptr);
|
||||
rfc_cb_ptr = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function PORT_SetTraceLevel
|
||||
|
|
Loading…
Reference in a new issue