From 1c3e412916df1193b270a6947782f96524e5fa45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 14 Nov 2020 23:01:04 +0100 Subject: archive: release refname after use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- archive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archive.h') 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; -- cgit v1.2.3