mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix a resource leak in os_unix.c.
FossilOrigin-Name: b29cda03fe4e8d8f5b5acbbea2d69f284a2bdf23
This commit is contained in:
@@ -4601,10 +4601,8 @@ static void unixRemapfile(
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The attempt to extend the existing mapping failed. Free the existing
|
||||
** mapping and set pNew to NULL so that the code below will create a
|
||||
** new mapping from scratch. */
|
||||
if( pNew==MAP_FAILED ){
|
||||
/* The attempt to extend the existing mapping failed. Free it. */
|
||||
if( pNew==MAP_FAILED || pNew==0 ){
|
||||
osMunmap(pOrig, nReuse);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user