summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/macos.c b/macos.c
index 09589cc82..aa2be4b3b 100644
--- a/macos.c
+++ b/macos.c
@@ -79,7 +79,7 @@ const char *system_default_filename(void)
const char *user = getenv("LOGNAME");
if (same_string(user, ""))
user = "username";
- filename = malloc(strlen(user) + 5);
+ filename = calloc(strlen(user) + 5, 1);
strcat(filename, user);
strcat(filename, ".xml");
}