mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
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 <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 836823e5047d0eb18e66707386ba03b812adfaf8)
This commit is contained in:
parent
0ebaac2afe
commit
5b9b8b3158
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user