/ Check-in [843e1c54]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Check for a NULL handle prior to manually calling winClose.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 843e1c543aabab8cd62f28742d5818887d36bcb7
User & Date: mistachkin 2013-02-15 04:21:01
Context
2013-02-16
02:41
Fix an unsafe VM register deallocation. check-in: cfba2c8d user: drh tags: trunk
2013-02-15
04:21
Check for a NULL handle prior to manually calling winClose. check-in: 843e1c54 user: mistachkin tags: trunk
2013-02-14
16:16
Verify that the schema has not changed before running PRAGMA table_info, index_list, index_info, and foreign_key_list. check-in: 82952d08 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

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