aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert2023-05-14 18:51:22 -0700
committerPaul Eggert2023-05-14 19:28:10 -0700
commit92d4bda27976b381fc1f7905e83bdb9da050261e (patch)
tree50c159ce84462e2794e94ad0a58d671e827b63b5 /lib-src
parent3e3f34d71e9c3c6c943580dc822afed7a3b0a861 (diff)
downloademacs-92d4bda27976b381fc1f7905e83bdb9da050261e.tar.gz
emacs-92d4bda27976b381fc1f7905e83bdb9da050261e.zip
Fix movemail fd leak
* lib-src/movemail.c (main) [!MAIL_USE_SYSTEM_LOCK]: Fix file descriptor leak, found by GCC 13 -Wanalyzer-fd-leak.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index a71be8c2099..6a772e9043e 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -470,7 +470,7 @@ main (int argc, char **argv)
470 that were set on the file. Better to just empty the file. */ 470 that were set on the file. Better to just empty the file. */
471 if (unlink (inname) < 0 && errno != ENOENT) 471 if (unlink (inname) < 0 && errno != ENOENT)
472#endif /* MAIL_UNLINK_SPOOL */ 472#endif /* MAIL_UNLINK_SPOOL */
473 creat (inname, 0600); 473 close (creat (inname, 0600));
474 } 474 }
475#endif /* not MAIL_USE_SYSTEM_LOCK */ 475#endif /* not MAIL_USE_SYSTEM_LOCK */
476 476