From 8b80382ad036d41bbdca24e24ba6e3470b2119c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD=E4=BA=91?= <71159641+littlewhitecloud@users.noreply.github.com> Date: Sat, 9 Dec 2023 19:07:46 +0800 Subject: [PATCH] my fault --- src/output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output.c b/src/output.c index fb75a9d4..2264dfed 100644 --- a/src/output.c +++ b/src/output.c @@ -107,8 +107,10 @@ static void mkdir_exist_ok(const char *p) static void write_gitinore(const char *p) { char *filename = malloc_sprintf("%s/.gitinore", p); - if (access(filename, F_OK)) + if (access(filename, F_OK)) { + free(filename); return; + } FILE *gitinore = fopen(filename, "w"); fprintf(gitinore, "*");