mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid leaking a file descriptor after a malloc failure on unix. (CVS 4518)
FossilOrigin-Name: c249d5da721b32f6fe409a5b55a5d49a58994fec
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user