diff options
author | dan <dan@noemail.net> | 2013-03-25 13:50:49 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2013-03-25 13:50:49 +0000 |
commit | a1afc7425a42b774b307416b3256d28c1d4a185f (patch) | |
tree | 8d10587a82dc1a47b3d0b8dcb967bf7a927a3e75 /src/os_unix.c | |
parent | f23da96636f9de1a81c939bd7a0cc25ee1d37f49 (diff) | |
download | sqlite-a1afc7425a42b774b307416b3256d28c1d4a185f.tar.gz sqlite-a1afc7425a42b774b307416b3256d28c1d4a185f.zip |
Fix a case in the pager where an xFetch() reference was being leaked following an OOM error.
FossilOrigin-Name: 5885ba6ce768658ec25b60747430d147b315b55c
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 334719200..d86581057 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1807,6 +1807,7 @@ end_unlock: ** the requested locking level, this routine is a no-op. */ static int unixUnlock(sqlite3_file *id, int eFileLock){ + assert( eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0 ); return posixUnlock(id, eFileLock, 0); } @@ -4531,7 +4532,6 @@ static int unixMapfile(unixFile *pFd, i64 nByte){ } if( nMap!=pFd->mmapSize ){ - void *pNew; unixUnmapfile(pFd); if( nMap>0 ){ |