Website Summary Files Commits Branches @commit @diff @stats
path: root / scan-tree.c
diff options
context:
space:
mode:
Commit687cdf69689edcaff8e9035af93baf1a9e71cf32 (patch)
Author
 John Keeping <john@keeping.me.uk>
2015-10-08 23:23:57 +0100
Committer
 Jason A. Donenfeld <Jason@zx2c4.com>
2015-10-09 10:54:30 +0200
Files1bacbdc963a38cd0befc9ddf7e4ed8d98d974fa8 /scan-tree.c
cgit-687cdf69689edcaff8e9035af93baf1a9e71cf32.tar
cgit-687cdf69689edcaff8e9035af93baf1a9e71cf32.tar.gz
cgit-687cdf69689edcaff8e9035af93baf1a9e71cf32.zip
Parent94182d6031df0d956a94ecd7ece233e345468961 (diff)
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>
1 files changed, 1 insertions, 1 deletions
-rw-r--r--scan-tree.c2
diff --git a/scan-tree.c b/scan-tree.c
index 8e3cf52..b5a10ff 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -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);
}