Skip to content

Commit b42ad7d

Browse files
carenasgitster
authored andcommitted
read-cache: use of memory after it is freed
introduced with c46c406 (trace.h: support nested performance tracing) on Aug 18, 2018 but not affecting maint Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Acked-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f4436a commit b42ad7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

read-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,8 +2038,8 @@ int read_index_from(struct index_state *istate, const char *path,
20382038
freshen_shared_index(base_path, 0);
20392039
merge_base_index(istate);
20402040
post_read_index_from(istate);
2041-
free(base_path);
20422041
trace_performance_leave("read cache %s", base_path);
2042+
free(base_path);
20432043
return ret;
20442044
}
20452045

0 commit comments

Comments
 (0)