Commit f5ffb40e2b7f0ba1a0d6494037cfa2c24dd30c47

Jeff Hostetler 2015-04-17T09:58:09

Also fix leak of TLS data on main thread.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/global.c b/src/global.c
index 3c97e62..0772bb0 100644
--- a/src/global.c
+++ b/src/global.c
@@ -223,13 +223,10 @@ int git_libgit2_init(void)
 
 static void synchronized_threads_shutdown(void)
 {
-	void *ptr;
-
 	/* Shut down any subsystems that have global state */
 	git__shutdown();
 
-	ptr = TlsGetValue(_tls_index);
-	git__global_state_cleanup(ptr);
+	git__free_thread_global_state();
 
 	TlsFree(_tls_index);
 	git_mutex_free(&git__mwindow_mutex);