SQLite
Check-in [843e1c543a]
Not logged in
Overview
SHA1 Hash:843e1c543aabab8cd62f28742d5818887d36bcb7
Date: 2013-02-15 04:21:01
User: mistachkin
Comment:Check for a NULL handle prior to manually calling winClose.
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to src/os_win.c

2989 (int)osGetCurrentProcessId(), i, 2989 (int)osGetCurrentProcessId(), i, 2990 bRc ? "ok" : "failed")); 2990 bRc ? "ok" : "failed")); 2991 bRc = osCloseHandle(p->aRegion[i].hMap); 2991 bRc = osCloseHandle(p->aRegion[i].hMap); 2992 OSTRACE(("SHM-PURGE pid-%d close region=%d %s\n", 2992 OSTRACE(("SHM-PURGE pid-%d close region=%d %s\n", 2993 (int)osGetCurrentProcessId(), i, 2993 (int)osGetCurrentProcessId(), i, 2994 bRc ? "ok" : "failed")); 2994 bRc ? "ok" : "failed")); 2995 } 2995 } 2996 if( p->hFile.h != INVALID_HANDLE_VALUE ){ | 2996 if( p->hFile.h!=NULL && p->hFile.h!=INVALID_HANDLE_VALUE ){ 2997 SimulateIOErrorBenign(1); 2997 SimulateIOErrorBenign(1); 2998 winClose((sqlite3_file *)&p->hFile); 2998 winClose((sqlite3_file *)&p->hFile); 2999 SimulateIOErrorBenign(0); 2999 SimulateIOErrorBenign(0); 3000 } 3000 } 3001 if( deleteFlag ){ 3001 if( deleteFlag ){ 3002 SimulateIOErrorBenign(1); 3002 SimulateIOErrorBenign(1); 3003 sqlite3BeginBenignMalloc(); 3003 sqlite3BeginBenignMalloc();