2140. [bug] libbind: missing unlock on pthread_key_create()
failures. [RT #16654]
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2140. [bug] libbind: missing unlock on pthread_key_create()
|
||||
failures. [RT #16654]
|
||||
|
||||
2139. [bug] dns_view_find() was being called with wrong type
|
||||
in adb.c. [RT #16670]
|
||||
|
||||
|
||||
@@ -68,8 +68,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) {
|
||||
pthread_mutex_unlock(&lock);
|
||||
goto unknown;
|
||||
}
|
||||
once = 1;
|
||||
}
|
||||
if (pthread_mutex_unlock(&lock) != 0)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: irs_data.c,v 1.10 2006/03/09 23:57:56 marka Exp $";
|
||||
static const char rcsid[] = "$Id: irs_data.c,v 1.11 2007/02/25 23:46:58 marka Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -132,8 +132,10 @@ net_data_init(const char *conf_file) {
|
||||
if (pthread_mutex_lock(&keylock) != 0)
|
||||
return (NULL);
|
||||
if (!once) {
|
||||
if (pthread_key_create(&key, net_data_destroy) != 0)
|
||||
if (pthread_key_create(&key, net_data_destroy) != 0) {
|
||||
pthread_mutex_unlock(&keylock);
|
||||
return (NULL);
|
||||
}
|
||||
once = 1;
|
||||
}
|
||||
if (pthread_mutex_unlock(&keylock) != 0)
|
||||
|
||||
Reference in New Issue
Block a user