[PATCH] read-cache: use of memory after it is freed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <carenas@xxxxxxxxx>
---
 read-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/read-cache.c b/read-cache.c
index 1df5c16dbc..78f47d2f50 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -2297,8 +2297,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;
 }
 
-- 
2.19.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux