mirror of
https://git.zx2c4.com/cgit
synced 2025-07-15 12:44:34 +02:00
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>
This commit is contained in:
parent
94182d6031
commit
687cdf6968
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
|
||||||
|
|
||||||
strbuf_addstr(path, "cgitrc");
|
strbuf_addstr(path, "cgitrc");
|
||||||
if (!stat(path->buf, &st))
|
if (!stat(path->buf, &st))
|
||||||
parse_configfile(xstrdup(path->buf), &repo_config);
|
parse_configfile(path->buf, &repo_config);
|
||||||
|
|
||||||
strbuf_release(&rel);
|
strbuf_release(&rel);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue