diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/os_win.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os_win.c b/src/os_win.c index 7867c876e..51171e07c 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -4248,7 +4248,10 @@ static int winOpenSharedMemory(winFile *pDbFd){ p->id = pShmNode->nextShmId++; #endif pDbFd->pShm = p; - }else{ + }else if( p ){ + if( p->hShm!=INVALID_HANDLE_VALUE ){ + osCloseHandle(p->hShm); + } sqlite3_free(p); } |