Diff between 76d29b9bad5f6c56aee54e9861b4286543cae575 and 009acf56fbcc5af78093dfd36cde2b8935f712f1

Changed Files

File Additions Deletions Status
src/shared/shell.c +7 -2 modified

Full Patch

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 10f2626..33bc0d9 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -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;