1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Enhanced documentation and minor code tweaks in preparation for hardening

the sqlite3_initialize/shutdown interfaces against initialization failures.

FossilOrigin-Name: 98c49e6135ae6268a80de88f8b0284f88ef32e1d
This commit is contained in:
drh
2009-08-17 13:42:29 +00:00
parent d768f944d9
commit 9ac06509f1
7 changed files with 54 additions and 17 deletions

View File

@@ -130,7 +130,8 @@ int sqlite3_initialize(void){
if( rc==SQLITE_OK ){
sqlite3GlobalConfig.isMallocInit = 1;
if( !sqlite3GlobalConfig.pInitMutex ){
sqlite3GlobalConfig.pInitMutex = sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
sqlite3GlobalConfig.pInitMutex =
sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){
rc = SQLITE_NOMEM;
}