From: Carlo Marcelo Arenas Belón Date: Sat, 20 Oct 2018 07:33:34 +0000 (-0700) Subject: read-cache: use of memory after it is freed X-Git-Tag: v2.20.0-rc0~70^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b42ad7d57d5c3a0d11effd01a7e025abee98509c;p=git read-cache: use of memory after it is freed introduced with c46c406ae1e (trace.h: support nested performance tracing) on Aug 18, 2018 but not affecting maint Signed-off-by: Carlo Marcelo Arenas Belón Acked-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/read-cache.c b/read-cache.c index 41f313bc9e..66fc5355e7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2038,8 +2038,8 @@ int read_index_from(struct index_state *istate, const char *path, freshen_shared_index(base_path, 0); merge_base_index(istate); post_read_index_from(istate); - free(base_path); trace_performance_leave("read cache %s", base_path); + free(base_path); return ret; }