From 836823e5047d0eb18e66707386ba03b812adfaf8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 8 Sep 2023 09:53:42 +0200 Subject: [PATCH] nsswitch/wb_common.c: winbind_destructor can always use get_wb_global_ctx() The HAVE_PTHREAD logic inside of get_wb_global_ctx() will do all required magic. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15464 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- nsswitch/wb_common.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index c382a44c120..d56e48d9bdb 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -246,14 +246,10 @@ static void winbind_destructor(void) return; } -#ifdef HAVE_PTHREAD_H - ctx = (struct winbindd_context *)pthread_getspecific(wb_global_ctx.key); + ctx = get_wb_global_ctx(); if (ctx == NULL) { return; } -#else - ctx = get_wb_global_ctx(); -#endif winbind_close_sock(ctx); } -- 2.47.3