diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/init-db.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c index d31dbc8837..efc66523e2 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -561,8 +561,10 @@ int cmd_init_db(int argc, const char **argv, const char *prefix) if (real_git_dir && !is_absolute_path(real_git_dir)) real_git_dir = real_pathdup(real_git_dir, 1); - if (template_dir && *template_dir && !is_absolute_path(template_dir)) + if (template_dir && *template_dir && !is_absolute_path(template_dir)) { template_dir = absolute_pathdup(template_dir); + UNLEAK(template_dir); + } if (argc == 1) { int mkdir_tried = 0; |