diff options
| author | Toomas Soome <tsoome@me.com> | 2019-01-20 23:09:40 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-06-18 21:14:09 +0300 |
| commit | e86c3f00315e5838c0ec0b14f34b94c292085956 (patch) | |
| tree | 040cb32e51b16d757494c9ea86e33afccfb32133 /usr/src/lib/libc/port/threads | |
| parent | ad24f9fb30ac1431734347d46a592d22cbfcf3b6 (diff) | |
| download | illumos-joyent-e86c3f00315e5838c0ec0b14f34b94c292085956.tar.gz | |
11091 libc: NULL pointer errors
Reviewed by: Norm Jacobs <naj@snapcon.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libc/port/threads')
| -rw-r--r-- | usr/src/lib/libc/port/threads/tdb_agent.c | 4 | ||||
| -rw-r--r-- | usr/src/lib/libc/port/threads/thr.c | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/usr/src/lib/libc/port/threads/tdb_agent.c b/usr/src/lib/libc/port/threads/tdb_agent.c index 919f0473f4..84de640b63 100644 --- a/usr/src/lib/libc/port/threads/tdb_agent.c +++ b/usr/src/lib/libc/port/threads/tdb_agent.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains most of the functionality * required to support the threads portion of libc_db. @@ -368,7 +366,7 @@ tdb_sync_obj_deregister(void *addr) * (Once the hash table is allocated, it is never deallocated.) */ if (tdbp->tdb_sync_addr_hash == NULL || - tdbp->tdb_sync_addr_hash[hash = tdb_addr_hash(addr)] == NULL) + tdbp->tdb_sync_addr_hash[hash = tdb_addr_hash(addr)] == 0) return; lmutex_lock(&udp->tdb_hash_lock); diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c index e849b19e6d..2a982eb8c8 100644 --- a/usr/src/lib/libc/port/threads/thr.c +++ b/usr/src/lib/libc/port/threads/thr.c @@ -88,12 +88,12 @@ extern const Lc_interface rtld_funcs[]; */ #pragma weak _uberdata = __uberdata uberdata_t __uberdata = { - { DEFAULTMUTEX, NULL, 0 }, /* link_lock */ - { RECURSIVEMUTEX, NULL, 0 }, /* ld_lock */ - { RECURSIVEMUTEX, NULL, 0 }, /* fork_lock */ - { RECURSIVEMUTEX, NULL, 0 }, /* atfork_lock */ - { RECURSIVEMUTEX, NULL, 0 }, /* callout_lock */ - { DEFAULTMUTEX, NULL, 0 }, /* tdb_hash_lock */ + { DEFAULTMUTEX, 0, 0 }, /* link_lock */ + { RECURSIVEMUTEX, 0, 0 }, /* ld_lock */ + { RECURSIVEMUTEX, 0, 0 }, /* fork_lock */ + { RECURSIVEMUTEX, 0, 0 }, /* atfork_lock */ + { RECURSIVEMUTEX, 0, 0 }, /* callout_lock */ + { DEFAULTMUTEX, 0, 0 }, /* tdb_hash_lock */ { 0, }, /* tdb_hash_lock_stats */ { { 0 }, }, /* siguaction[NSIG] */ {{ DEFAULTMUTEX, NULL, 0 }, /* bucket[NBUCKETS] */ |
