diff options
author | Leo Yang <lyang@topologyinc.com> | 2015-02-26 11:47:07 -0500 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2015-03-04 14:47:57 +0100 |
commit | 3a8b69d13da66a0555231c84e71df010129b5afb (patch) | |
tree | 6c1639d96beabbe00255f0908a26f9fb3b3f0414 /src/global.c | |
parent | 814d86bfe36825c44f43eb771b4640b428e3c05a (diff) | |
download | libgit2-3a8b69d13da66a0555231c84e71df010129b5afb.tar.gz |
Fix leak of TLS error message in shutdown (ptherad version)
Diffstat (limited to 'src/global.c')
-rw-r--r-- | src/global.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/global.c b/src/global.c index fcbcbb176..ee4c929dc 100644 --- a/src/global.c +++ b/src/global.c @@ -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); |