tr2: stop leaking "thread_name" memory
Fix a memory leak introduced in ee4512ed481 (trace2: create new combined trace facility, 2019-02-22), we were doing a free() of other memory allocated in tr2tls_create_self(), but not the "thread_name" "struct strbuf". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f2cc8881d7
commit
48f68715b1
@ -95,6 +95,7 @@ void tr2tls_unset_self(void)
|
|||||||
|
|
||||||
pthread_setspecific(tr2tls_key, NULL);
|
pthread_setspecific(tr2tls_key, NULL);
|
||||||
|
|
||||||
|
strbuf_release(&ctx->thread_name);
|
||||||
free(ctx->array_us_start);
|
free(ctx->array_us_start);
|
||||||
free(ctx);
|
free(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user