mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
apps/system/vi: Add missing vi_release before exit.
If VI exit without vi_release, that broken console. Signed-off-by: Leo Chung <gewalalb@gmail.com>
This commit is contained in:
parent
c0e04b0251
commit
c7a905ec0c
1 changed files with 2 additions and 0 deletions
|
|
@ -559,6 +559,7 @@ static void vi_write(FAR struct vi_s *vi, FAR const char *buffer,
|
|||
{
|
||||
fprintf(stderr, "ERROR: write to stdout failed: %d\n",
|
||||
errcode);
|
||||
vi_release(vi);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -635,6 +636,7 @@ static int vi_getch(FAR struct vi_s *vi)
|
|||
{
|
||||
fprintf(stderr, "ERROR: read from stdin failed: %d\n",
|
||||
errcode);
|
||||
vi_release(vi);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue