]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a resource leak in os_unix.c.
authordan <dan@noemail.net>
Tue, 2 Apr 2013 20:55:01 +0000 (20:55 +0000)
committerdan <dan@noemail.net>
Tue, 2 Apr 2013 20:55:01 +0000 (20:55 +0000)
FossilOrigin-Name: b29cda03fe4e8d8f5b5acbbea2d69f284a2bdf23

manifest
manifest.uuid
src/os_unix.c

index abae49480a48805153e4a893316ff8bb7237a694..041087f9176faa70f2d9647b48337976c487de2b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Adjustments\sto\smmap1.test\sso\sthat\sit\sworks\sbetter\son\swindows.\s\sIt\sstill\sgets\nsome\sanswers\swrong,\sbut\sit\sno\slonger\scrashes.
-D 2013-04-02T20:29:33.219
+C Fix\sa\sresource\sleak\sin\sos_unix.c.
+D 2013-04-02T20:55:01.697
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in df3e48659d80e1b7765785d8d66c86b320f72cc7
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -160,7 +160,7 @@ F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30
 F src/os.c 809d0707cec693e1b9b376ab229271ad74c3d35d
 F src/os.h ae08bcc5f6ec6b339f4a2adf3931bb88cc14c3e4
 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
-F src/os_unix.c 42684a59b06b912b3ab80a8ad9f4295c0572a1f4
+F src/os_unix.c e8e76c95425e60a4d0c749c1ed5d6e00109782f5
 F src/os_win.c 6a7a1017fb6a0783a3aa7c3f5eadd9b1600a9ddf
 F src/pager.c e26184d451207542d56bd09b84339252a194791e
 F src/pager.h 5cb78b8e1adfd5451e600be7719f5a99d87ac3b1
@@ -1042,7 +1042,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P c0cdaa07355f51bd217881b5b91ec2a609fa56f4
-R 2d6cafbf0f715d3130e0ad2821f95af0
-U drh
-Z eb8137777309edfff1693e4a3a7e15de
+P ee8d3ceeec40d84adb8798f084b6f1215ab56d92
+R 40861d78d26ec4eddf163e4d116b8b4f
+U dan
+Z 36ae50dfb6860cc1a436ea46d4e8b8f3
index 6a1646888aa27e2ea752feafb44cb886421dc8d1..cb24cad0994004398d305e9fa427b6edc3ce8990 100644 (file)
@@ -1 +1 @@
-ee8d3ceeec40d84adb8798f084b6f1215ab56d92
\ No newline at end of file
+b29cda03fe4e8d8f5b5acbbea2d69f284a2bdf23
\ No newline at end of file
index 07c919c9831e7dad437fe1b4ccf786920cbef6ea..581afdbc91e96d6a9b5ca83c97bfb6c15e3e2dd9 100644 (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);
     }
   }