summaryrefslogtreecommitdiffstats
path: root/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux.c')
-rw-r--r--linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux.c b/linux.c
index d82e77436..d23af1aa0 100644
--- a/linux.c
+++ b/linux.c
@@ -86,7 +86,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");
}