Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2020-11-15 01:01:04 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-17 01:21:43 +0300
commit1c3e412916df1193b270a6947782f96524e5fa45 (patch)
tree7c706eeaad605df44263f237334f5764cdfb71ff /archive.h
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
archive: release refname after use
parse_treeish_arg() uses dwim_ref() to set refname to a strdup'd string. Release it after use. Also remove the const qualifier from the refname member to signify that ownership of the string is handed to the struct, leaving cleanup duty with the caller of parse_treeish_arg(), thus avoiding a cast. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive.h')
-rw-r--r--archive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.h b/archive.h
index 82b226011a..43028ffbf3 100644
--- a/archive.h
+++ b/archive.h
@@ -8,7 +8,7 @@ struct repository;
struct archiver_args {
struct repository *repo;
- const char *refname;
+ char *refname;
const char *prefix;
const char *base;
size_t baselen;