Commit 3a8b69d1 by Leo Yang Committed by Carlos Martín Nieto

Fix leak of TLS error message in shutdown (ptherad version)

parent 814d86bf
......@@ -263,9 +263,7 @@ int init_error = 0;
static void cb__free_status(void *st)
{
git_global_st *state = (git_global_st *) st;
git__free(state->error_t.message);
giterr_clear();
git__free(st);
}
......@@ -308,6 +306,8 @@ int git_libgit2_shutdown(void)
/* Shut down any subsystems that have global state */
git__shutdown();
giterr_clear();
ptr = pthread_getspecific(_tls_key);
pthread_setspecific(_tls_key, NULL);
git__free(ptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment