projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e3f34d
)
Fix movemail fd leak
author
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 15 May 2023 01:51:22 +0000
(18:51 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 15 May 2023 02:28:10 +0000
(19:28 -0700)
* lib-src/movemail.c (main) [!MAIL_USE_SYSTEM_LOCK]:
Fix file descriptor leak, found by GCC 13 -Wanalyzer-fd-leak.
lib-src/movemail.c
patch
|
blob
|
history
diff --git
a/lib-src/movemail.c
b/lib-src/movemail.c
index a71be8c209943fd1729efca6b865192e9d9228cd..6a772e9043ed56aa6f54b3152a36f94940fa0fc1 100644
(file)
--- a/
lib-src/movemail.c
+++ b/
lib-src/movemail.c
@@
-470,7
+470,7
@@
main (int argc, char **argv)
that were set on the file. Better to just empty the file. */
if (unlink (inname) < 0 && errno != ENOENT)
#endif /* MAIL_UNLINK_SPOOL */
- c
reat (inname, 0600
);
+ c
lose (creat (inname, 0600)
);
}
#endif /* not MAIL_USE_SYSTEM_LOCK */