mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 18:11:43 +00:00
Fix leak of TLS error message in shutdown (ptherad version)
This commit is contained in:
parent
814d86bfe3
commit
3a8b69d13d
@ -263,9 +263,7 @@ int init_error = 0;
|
|||||||
|
|
||||||
static void cb__free_status(void *st)
|
static void cb__free_status(void *st)
|
||||||
{
|
{
|
||||||
git_global_st *state = (git_global_st *) st;
|
giterr_clear();
|
||||||
git__free(state->error_t.message);
|
|
||||||
|
|
||||||
git__free(st);
|
git__free(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,6 +306,8 @@ int git_libgit2_shutdown(void)
|
|||||||
/* Shut down any subsystems that have global state */
|
/* Shut down any subsystems that have global state */
|
||||||
git__shutdown();
|
git__shutdown();
|
||||||
|
|
||||||
|
giterr_clear();
|
||||||
|
|
||||||
ptr = pthread_getspecific(_tls_key);
|
ptr = pthread_getspecific(_tls_key);
|
||||||
pthread_setspecific(_tls_key, NULL);
|
pthread_setspecific(_tls_key, NULL);
|
||||||
git__free(ptr);
|
git__free(ptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user