diff options
| author | Doug Barton <dougb@FreeBSD.org> | 2008-07-12 08:12:46 +0000 | 
|---|---|---|
| committer | Doug Barton <dougb@FreeBSD.org> | 2008-07-12 08:12:46 +0000 | 
| commit | cba78608de638f8cc6d1d48a2b3072e82386b70d (patch) | |
| tree | 2857dd6ab984105d7ac37bbcfc816607c48ccc1d /lib/bind/irs/gai_strerror.c | |
| parent | f16b9a8f9e30675de8048c5832ffbb3f50f2fdc4 (diff) | |
Diffstat (limited to 'lib/bind/irs/gai_strerror.c')
| -rw-r--r-- | lib/bind/irs/gai_strerror.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/lib/bind/irs/gai_strerror.c b/lib/bind/irs/gai_strerror.c index 0492f8f49aa8..e8921ea43246 100644 --- a/lib/bind/irs/gai_strerror.c +++ b/lib/bind/irs/gai_strerror.c @@ -69,8 +69,10 @@ gai_strerror(int ecode) {                  if (pthread_mutex_lock(&lock) != 0)  			goto unknown;                  if (!once) { -                        if (pthread_key_create(&key, free) != 0) +                        if (pthread_key_create(&key, free) != 0) { +				(void)pthread_mutex_unlock(&lock);  				goto unknown; +			}  			once = 1;  		}                  if (pthread_mutex_unlock(&lock) != 0) | 
