archive: release refname after use
commit1c3e412916df1193b270a6947782f96524e5fa45
authorRené Scharfe <l.s.r@web.de>
Sat, 14 Nov 2020 22:01:04 +0000 (14 23:01 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Nov 2020 22:21:43 +0000 (16 14:21 -0800)
tree7c706eeaad605df44263f237334f5764cdfb71ff
parent898f80736c75878acc02dc55672317fcc0e0a5a6
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>
archive.c
archive.h