mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix #3913
This commit is contained in:
@@ -84,7 +84,7 @@ new(PyTypeObject *type, PyObject UNUSED *args, PyObject UNUSED *kwds) {
|
|||||||
static int
|
static int
|
||||||
open_cache_file_without_tmpfile(const char *cache_path) {
|
open_cache_file_without_tmpfile(const char *cache_path) {
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
static const char *template = "%s/disk-cache-XXXXXXXXXXXX";
|
static const char template[] = "%s/disk-cache-XXXXXXXXXXXX";
|
||||||
const size_t sz = strlen(cache_path) + sizeof(template) + 4;
|
const size_t sz = strlen(cache_path) + sizeof(template) + 4;
|
||||||
FREE_AFTER_FUNCTION char *buf = calloc(1, sz);
|
FREE_AFTER_FUNCTION char *buf = calloc(1, sz);
|
||||||
if (!buf) { errno = ENOMEM; return -1; }
|
if (!buf) { errno = ENOMEM; return -1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user