scan-tree: remove useless strdup()

parse_configfile() takes a "const char *" and doesn't hold any
references to it after it returns; there is no reason to pass it a
duplicate.

Coverity-id: 13941
Signed-off-by: John Keeping <john@keeping.me.uk>
这个提交包含在:
John Keeping 2015-10-08 23:23:57 +01:00 提交者 Jason A. Donenfeld
父节点 94182d6031
当前提交 687cdf6968

查看文件

@ -174,7 +174,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
strbuf_addstr(path, "cgitrc");
if (!stat(path->buf, &st))
parse_configfile(xstrdup(path->buf), &repo_config);
parse_configfile(path->buf, &repo_config);
strbuf_release(&rel);
}