summaryrefslogtreecommitdiff
path: root/apps/system/vi/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/system/vi/vi.c')
-rw-r--r--apps/system/vi/vi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/system/vi/vi.c b/apps/system/vi/vi.c
index c2524f887..6289ee219 100644
--- a/apps/system/vi/vi.c
+++ b/apps/system/vi/vi.c
@@ -1230,6 +1230,7 @@ static bool vi_savetext(FAR struct vi_s *vi, FAR const char *filename,
/* Report the error (or partial write). EINTR is not handled. */
vi_error(vi, g_fmtcmdfail, "fwrite", errno);
+ (void)fclose(stream);
return false;
}