summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite/src/os_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/os_win.c')
-rw-r--r--ext/pdo_sqlite/sqlite/src/os_win.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/os_win.c b/ext/pdo_sqlite/sqlite/src/os_win.c
index 9da53e9fee..b15de03340 100644
--- a/ext/pdo_sqlite/sqlite/src/os_win.c
+++ b/ext/pdo_sqlite/sqlite/src/os_win.c
@@ -408,6 +408,12 @@ static void winceDestroyLock(winFile *pFile){
UnmapViewOfFile(pFile->shared);
CloseHandle(pFile->hShared);
+ if( pFile->zDeleteOnClose ){
+ DeleteFileW(pFile->zDeleteOnClose);
+ sqliteFree(pFile->zDeleteOnClose);
+ pFile->zDeleteOnClose = 0;
+ }
+
/* Done with the mutex */
winceMutexRelease(pFile->hMutex);
CloseHandle(pFile->hMutex);
@@ -975,10 +981,6 @@ static int winClose(OsFile **pId){
}while( rc==0 && cnt++ < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
#if OS_WINCE
winceDestroyLock(pFile);
- if( pFile->zDeleteOnClose ){
- DeleteFileW(pFile->zDeleteOnClose);
- sqliteFree(pFile->zDeleteOnClose);
- }
#endif
OpenCounter(-1);
sqliteFree(pFile);