diff --git a/config.c b/config.c
index edf9914df6a1a789780c98d53b7b779908bb9141..b6d789a189713a0259e3f8eb0e29ef657cde66c7 100644 (file)
--- a/config.c
+++ b/config.c
home = getenv("HOME");
if (home) {
home = getenv("HOME");
if (home) {
- char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
+ char buf[PATH_MAX];
+ char *user_config = mksnpath(buf, sizeof(buf), "%s/.gitconfig", home);
if (!access(user_config, R_OK)) {
ret += git_config_from_file(fn, user_config, data);
found += 1;
}
if (!access(user_config, R_OK)) {
ret += git_config_from_file(fn, user_config, data);
found += 1;
}
- free(user_config);
}
if (repo_config && !access(repo_config, R_OK)) {
}
if (repo_config && !access(repo_config, R_OK)) {