aboutsummaryrefslogtreecommitdiff
path: root/src/os.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-06-26 08:29:34 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-06-26 08:29:34 +0000
commit71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97 (patch)
tree8426069ec3b504f6e836b5be6bb912e75e8959a0 /src/os.c
parent4766b29d95d59a4d7e88b8d644a568d406643271 (diff)
downloadsqlite-71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97.tar.gz
sqlite-71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97.zip
Fix a race condition in sqlite3_initialize(). (CVS 5310)
FossilOrigin-Name: 70b2ed2afcf1757d1c58f3a83dad4a5fb226ae63
Diffstat (limited to 'src/os.c')
-rw-r--r--src/os.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/os.c b/src/os.c
index a746cd726..3a58e77f0 100644
--- a/src/os.c
+++ b/src/os.c
@@ -13,7 +13,7 @@
** This file contains OS interface code that is common to all
** architectures.
**
-** $Id: os.c,v 1.116 2008/06/25 17:19:01 danielk1977 Exp $
+** $Id: os.c,v 1.117 2008/06/26 08:29:34 danielk1977 Exp $
*/
#define _SQLITE_OS_C_ 1
#include "sqliteInt.h"
@@ -243,18 +243,12 @@ static void vfsUnlink(sqlite3_vfs *pVfs){
** true.
*/
int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
-#ifndef SQLITE_MUTEX_NOOP
sqlite3_mutex *mutex = 0;
-#endif
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
if( rc ) return rc;
#endif
-#ifndef SQLITE_MUTEX_NOOP
- if( sqlite3Config.isInit!=1 ){
- mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
- }
-#endif
+ mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
sqlite3_mutex_enter(mutex);
vfsUnlink(pVfs);
if( makeDflt || vfsList==0 ){