summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-05-01 20:14:23 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-05-06 22:01:17 +0200
commit5c2918b4f319c0d17a4b0817beb105ce7d5ed989 (patch)
treefffd5486d5179ae2bf90f93774d54996f69b4da1 /misc
parentb6472017951ce0d0666ba81034a45105bc3c977d (diff)
downloadmpv-5c2918b4f319c0d17a4b0817beb105ce7d5ed989.tar.bz2
mpv-5c2918b4f319c0d17a4b0817beb105ce7d5ed989.tar.xz
io_utils: use mp_mkostemps instead of mkstemp
Diffstat (limited to 'misc')
-rw-r--r--misc/io_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/io_utils.c b/misc/io_utils.c
index 6a98336553..fafed772cc 100644
--- a/misc/io_utils.c
+++ b/misc/io_utils.c
@@ -63,7 +63,7 @@ bool mp_save_to_file(const char *filepath, const void *data, size_t size)
bool result = false;
char *tmp = talloc_asprintf(NULL, "%sXXXXXX", filepath);
- int fd = mkstemp(tmp);
+ int fd = mp_mkostemps(tmp, 0, O_CLOEXEC);
if (fd < 0)
goto done;
FILE *cache = fdopen(fd, "wb");