blob: ff18ea03b39d2e12a714c0fb1c787e03bb4312b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ai,v 1.1 2009/10/21 04:21:27 taca Exp $
* Release connection->mutex before destroy it when
connection->protection_level isn't TS_LEVEL3 since it causes destroying
locked mutex when explicitly specifies "Threading" parameter in
odbcinst.ini. I don't know the case using LIBTHREAD.
--- DriverManager/__handles.c.orig 2009-10-20 16:47:04.000000000 +0900
+++ DriverManager/__handles.c
@@ -737,6 +737,8 @@ void __release_dbc( DMHDBC connection )
#ifdef HAVE_LIBPTH
#elif HAVE_LIBPTHREAD
+ if ( connection -> protection_level != TS_LEVEL3)
+ mutex_exit( &connection -> mutex );
pthread_mutex_destroy( &connection -> mutex );
#elif HAVE_LIBTHREAD
mutex_destroy( &connection -> mutex );
|