mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Enhance sqlite3_shutdown() so that it automatically invokes
sqlite3_reset_auto_extension(). This is a harmless no-op if applications are already calling sqlite3_reset_auto_extension() prior to sqlite3_shutdown(). And it prevents possible memory corruption if they do not. So it works either way. Most of the changes are to the test cases. (CVS 6475) FossilOrigin-Name: 0c41f7cff4f6ffb9321f6f6b6ef3e431b750d41a
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.535 2009/04/02 17:22:42 drh Exp $
|
||||
** $Id: main.c,v 1.536 2009/04/09 01:23:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -219,6 +219,7 @@ int sqlite3_shutdown(void){
|
||||
if( sqlite3GlobalConfig.isInit ){
|
||||
sqlite3_os_end();
|
||||
}
|
||||
sqlite3_reset_auto_extension();
|
||||
sqlite3MallocEnd();
|
||||
sqlite3MutexEnd();
|
||||
sqlite3GlobalConfig.isInit = 0;
|
||||
|
||||
Reference in New Issue
Block a user