1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor.

FossilOrigin-Name: 95cc976f1520bdaedd8f93b0e9fbef94e4e2c8cc
This commit is contained in:
dan
2010-06-07 19:26:54 +00:00
parent 430e74cd9b
commit 7df6c2c04b
3 changed files with 8 additions and 7 deletions

View File

@@ -3269,6 +3269,7 @@ static void unixShmPurge(unixFile *pFd){
assert( p->pInode==pFd->pInode );
if( p->mutex ) sqlite3_mutex_free(p->mutex);
if( p->mutexBuf ) sqlite3_mutex_free(p->mutexBuf);
if( p->pMMapBuf ) munmap(p->pMMapBuf, p->szMap);
if( p->h>=0 ) close(p->h);
p->pInode->pShmNode = 0;
sqlite3_free(p);