1
0
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:
dan
2013-04-02 20:55:01 +00:00
parent c3d53189fc
commit 48ccef8059
3 changed files with 10 additions and 12 deletions

View File

@@ -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);
}
}