Commit 60bdce0
committed
Fix FD leak when checking lock dir permissions.
`mkstemp(3)` creates and opens a file descriptor for a temporary file,
but this file descriptor was immediately discarded in favour of
`fopen(3)`'ing the file by name and using that `FILE *` stream. I'm sure
whoever originally wrote this code meant to use `mktemp(3)` instead,
which only creates a unique file from a template name (equivalent to
`mktemp(1)`).1 parent 6c54eeb commit 60bdce0
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5835 | 5835 | | |
5836 | 5836 | | |
5837 | 5837 | | |
5838 | | - | |
| 5838 | + | |
5839 | 5839 | | |
5840 | 5840 | | |
5841 | 5841 | | |
| |||
0 commit comments