summaryrefslogtreecommitdiff
path: root/lib/util/talloc_stack.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-14 15:19:39 -0700
committerJeremy Allison <jra@samba.org>2009-04-14 15:19:39 -0700
commit8e06e945b6b03db825862f2f057f0dfe13ade3a2 (patch)
treed95c239803eec9626c9da3b16f5bc0c71672b523 /lib/util/talloc_stack.c
parent4721be488ceb8229d564e4b63ca9937603394e51 (diff)
downloadsamba-8e06e945b6b03db825862f2f057f0dfe13ade3a2.tar.gz
samba-8e06e945b6b03db825862f2f057f0dfe13ade3a2.tar.bz2
samba-8e06e945b6b03db825862f2f057f0dfe13ade3a2.zip
Ensure a tls key is only generated once - wrap create & destroy in a mutex.
Change the function names to add _once to the tls_create & tls_destroy to make this obvious. Jeremy.
Diffstat (limited to 'lib/util/talloc_stack.c')
-rw-r--r--lib/util/talloc_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c
index a9b6e033ce..f572dd6c77 100644
--- a/lib/util/talloc_stack.c
+++ b/lib/util/talloc_stack.c
@@ -74,7 +74,7 @@ static struct talloc_stackframe *talloc_stackframe_init(void)
ZERO_STRUCTP(ts);
- if (SMB_THREAD_CREATE_TLS("talloc_stackframe", global_ts)) {
+ if (SMB_THREAD_CREATE_TLS_ONCE("talloc_stackframe", global_ts)) {
smb_panic("talloc_stackframe_init create_tls failed");
}