Describe the bug
Using linux-port, when running/debugging the hfp_ag_demo file, a segfault happens when the audio connection is established, and I try to close it, both with stdin process input command or CTRL+C.

To Reproduce
Steps to reproduce the behavior:
- Run example hfp_ag_demo using linux-port
- Connect to the headset
- Establish ACL connection
- Establish audio connection
- Close it: default is 'B', or close the program with CTRL+C
Expected behavior
Audio connection should close without any errors
Additional context
Running on linux embedded custom platform