mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-14 06:25:08 +08:00
shared/shell: Add bt_shell_cleanup
This releases resources used for shell initialization. This is needed as a separate function to enable clean shutdown when an application needs to exit prior to calling bt_shell_run(), e.g., when failing program initialization based on processed command line input options.
This commit is contained in:
parent
76d29b9bad
commit
009acf56fb
@ -1001,11 +1001,16 @@ void bt_shell_run(void)
|
||||
|
||||
mainloop_run();
|
||||
|
||||
io_destroy(signal);
|
||||
|
||||
bt_shell_cleanup();
|
||||
}
|
||||
|
||||
void bt_shell_cleanup(void)
|
||||
{
|
||||
bt_shell_release_prompt("");
|
||||
bt_shell_detach();
|
||||
|
||||
io_destroy(signal);
|
||||
|
||||
if (data.envs) {
|
||||
queue_destroy(data.envs, env_destroy);
|
||||
data.envs = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user