diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-10-30 17:28:51 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-10-30 17:28:51 +0000 |
commit | 7c055b9b7c57aa9715cf368dd007fa081f58b46a (patch) | |
tree | 2b1e4267aee78ed55dd8cd2028072fea48629aa7 /src | |
parent | 5f0f2533153a0c2a25d1a591515a356ed45713d6 (diff) | |
download | sqlite-7c055b9b7c57aa9715cf368dd007fa081f58b46a.tar.gz sqlite-7c055b9b7c57aa9715cf368dd007fa081f58b46a.zip |
Avoid leaking a file descriptor after a malloc failure on unix. (CVS 4518)
FossilOrigin-Name: c249d5da721b32f6fe409a5b55a5d49a58994fec
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index f4dc24f04..cd6a074a8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2268,6 +2268,7 @@ static int fillInUnixFile( rc = findLockInfo(h, &pNew->pLock, &pNew->pOpen); leaveMutex(); if( rc ){ + if( dirfd>=0 ) close(dirfd); close(h); return SQLITE_NOMEM; } |