From fa32f4b1779c339eed5b6e0717c8ce490175e002 Mon Sep 17 00:00:00 2001 From: arthur Date: Fri, 31 Oct 2025 09:10:57 +0100 Subject: [PATCH] Update src/init.c --- src/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index 7d080ec..23c5eb1 100644 --- a/src/init.c +++ b/src/init.c @@ -34,7 +34,7 @@ void initBuiltins() { } void initEditor() { - char init_file_path[256]; + char * init_file_path = (char *) calloc(256, sizeof(char)); E.cursor_x = 0; E.cursor_y = 0; E.rx = 0; @@ -66,6 +66,7 @@ void initEditor() { // Read config file E.ctx_data = lisp_read_file(E.fd_init_file, &E.ctx_error, E.ctx); + free(init_file_path); if (E.ctx_error != LISP_ERROR_NONE) { die("init failed"); }