mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
When a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
sqlite3_file object so that subsequent xClose() operations against that same file handler are no-ops. Bug in the test_async.c module only - not in the core library. Ticket #3744. (CVS 6384) FossilOrigin-Name: c32b454118f4b0cc615edb9b35f749db45f6b36d
This commit is contained in:
7
src/os.c
7
src/os.c
@@ -13,7 +13,7 @@
|
||||
** This file contains OS interface code that is common to all
|
||||
** architectures.
|
||||
**
|
||||
** $Id: os.c,v 1.125 2008/12/08 18:19:18 drh Exp $
|
||||
** $Id: os.c,v 1.126 2009/03/25 14:24:42 drh Exp $
|
||||
*/
|
||||
#define _SQLITE_OS_C_ 1
|
||||
#include "sqliteInt.h"
|
||||
@@ -112,8 +112,11 @@ int sqlite3OsOpen(
|
||||
int flags,
|
||||
int *pFlagsOut
|
||||
){
|
||||
int rc;
|
||||
DO_OS_MALLOC_TEST;
|
||||
return pVfs->xOpen(pVfs, zPath, pFile, flags, pFlagsOut);
|
||||
rc = pVfs->xOpen(pVfs, zPath, pFile, flags, pFlagsOut);
|
||||
assert( rc==SQLITE_OK || pFile->pMethods==0 );
|
||||
return rc;
|
||||
}
|
||||
int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
|
||||
return pVfs->xDelete(pVfs, zPath, dirSync);
|
||||
|
Reference in New Issue
Block a user