mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-21 13:38:01 +03:00
Fix a potential memory leak in the VxWorks VFS that can occur following
an OOM or I/O error during xOpen(). FossilOrigin-Name: cb880145d899832cca0612b89024a54d188ed706600fa812ea74587d69c261be
This commit is contained in:
@@ -5982,10 +5982,16 @@ static int fillInUnixFile(
|
||||
storeLastErrno(pNew, 0);
|
||||
#if OS_VXWORKS
|
||||
if( rc!=SQLITE_OK ){
|
||||
if( h>=0 ) robust_close(pNew, h, __LINE__);
|
||||
h = -1;
|
||||
if( h>=0 ){
|
||||
robust_close(pNew, h, __LINE__);
|
||||
h = -1;
|
||||
}
|
||||
osUnlink(zFilename);
|
||||
pNew->ctrlFlags |= UNIXFILE_DELETE;
|
||||
if( pNew->pId ){
|
||||
vxworksReleaseFileId(pNew->pId);
|
||||
pNew->pId = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
||||
Reference in New Issue
Block a user