1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Allow sqlite3_shutdown() to be called by a process before sqlite3_initialize() is. Prior to this commit such a call could segfault. (CVS 6296)

FossilOrigin-Name: 79431c58d964d6057c7f42f7c1df74f3df4493eb
This commit is contained in:
danielk1977
2009-02-17 16:29:10 +00:00
parent e8df800d4c
commit 0a54907159
5 changed files with 25 additions and 15 deletions

View File

@@ -14,7 +14,7 @@
** This file contains code that is common across all mutex implementations.
**
** $Id: mutex.c,v 1.29 2008/10/07 15:25:48 drh Exp $
** $Id: mutex.c,v 1.30 2009/02/17 16:29:11 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -67,7 +67,9 @@ int sqlite3MutexInit(void){
*/
int sqlite3MutexEnd(void){
int rc = SQLITE_OK;
rc = sqlite3GlobalConfig.mutex.xMutexEnd();
if( sqlite3GlobalConfig.mutex.xMutexEnd ){
rc = sqlite3GlobalConfig.mutex.xMutexEnd();
}
return rc;
}