Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171175033
D27784.id81223.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27784.id81223.diff
View Options
Index: lib/libc/net/nsdispatch.c
===================================================================
--- lib/libc/net/nsdispatch.c
+++ lib/libc/net/nsdispatch.c
@@ -185,7 +185,6 @@
static void ns_src_free(ns_src **, int);
static void nss_load_builtin_modules(void);
static void nss_load_module(const char *, nss_module_register_fn);
-static void nss_atexit(void);
/* nsparser */
extern FILE *_nsyyin;
@@ -384,8 +383,6 @@
(vector_free_elem)ns_dbt_free);
VECTOR_FREE(_nsmod, &_nsmodsize, sizeof(*_nsmod),
(vector_free_elem)ns_mod_free);
- if (confmod == 0)
- (void)atexit(nss_atexit);
nss_load_builtin_modules();
_nsyyparse();
(void)fclose(_nsyyin);
@@ -548,8 +545,6 @@
vector_sort(_nsmod, _nsmodsize, sizeof(*_nsmod), string_compare);
}
-static int exiting = 0;
-
static void
ns_mod_free(ns_mod *mod)
{
@@ -559,30 +554,10 @@
return;
if (mod->unregister != NULL)
mod->unregister(mod->mtab, mod->mtabsize);
- if (mod->handle != nss_builtin_handle && !exiting)
+ if (mod->handle != nss_builtin_handle)
(void)dlclose(mod->handle);
}
-/*
- * Cleanup
- */
-static void
-nss_atexit(void)
-{
- int isthreaded;
-
- exiting = 1;
- isthreaded = __isthreaded;
- if (isthreaded)
- (void)_pthread_rwlock_wrlock(&nss_lock);
- VECTOR_FREE(_nsmap, &_nsmapsize, sizeof(*_nsmap),
- (vector_free_elem)ns_dbt_free);
- VECTOR_FREE(_nsmod, &_nsmodsize, sizeof(*_nsmod),
- (vector_free_elem)ns_mod_free);
- if (isthreaded)
- (void)_pthread_rwlock_unlock(&nss_lock);
-}
-
/*
* Finally, the actual implementation.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 10, 6:19 AM (10 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38633219
Default Alt Text
D27784.id81223.diff (1 KB)
Attached To
Mode
D27784: nsdispatch(3): drop useless atexit hook
Attached
Detach File
Event Timeline
Log In to Comment