Commit 8363ddb3 authored by Mark Andrews's avatar Mark Andrews
Browse files

2140. [bug] libbind: missing unlock on pthread_key_create()

                        failures. [RT #16654]
parent 214649f6
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment