]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Avoid leaking a file descriptor after a malloc failure on unix. (CVS 4518)
authordanielk1977 <danielk1977@noemail.net>
Tue, 30 Oct 2007 17:28:51 +0000 (17:28 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Tue, 30 Oct 2007 17:28:51 +0000 (17:28 +0000)
FossilOrigin-Name: c249d5da721b32f6fe409a5b55a5d49a58994fec

manifest
manifest.uuid
src/os_unix.c

index 58126b18bdb56bef17dc8ad198683b3ae9546e5c..164a68fc403b0f6087eda34719f5a24edba51352 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sa\sdebugging\sassert()\sthat\swent\sin\sby\saccident\swith\sthe\sprevious\scommit.\s(CVS\s4517)
-D 2007-10-30T15:38:13
+C Avoid\sleaking\sa\sfile\sdescriptor\safter\sa\smalloc\sfailure\son\sunix.\s(CVS\s4518)
+D 2007-10-30T17:28:52
 F Makefile.in 30c7e3ba426ddb253b8ef037d1873425da6009a8
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -117,7 +117,7 @@ F src/os_os2.c 98f5486f033a98406ac10619b2dde21aac9ff75e
 F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
-F src/os_unix.c e556e86a2f027102e11f67b1b3a649fce1a8670b
+F src/os_unix.c db6755454c84004d0041eb1b2194c90b35db0a5b
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
 F src/os_win.c fe8f2d8fc3a010a2e9d4a0acbdcf4981522cac7b
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
@@ -584,7 +584,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 5e3f7c3dec3e8d92b28a74293387b390fe6fc1fa
-R 6bd10334efc8a18fa51f2db49ec5868e
+P 4ad60bdba0f1aa068dcc42fb58b80d7912e36b1b
+R eab92563ee745f8784bf52cc2537c42c
 U danielk1977
-Z ad2cd90cf7df04b2d0ad8dbc2c154fe3
+Z b867cfa02d41c621c1fcb64d6a074295
index 831f37b27543efcc38cfdd52757d4e1c2460d3a8..f86f9ce6cc947e6b5387428e538ea09882332cc0 100644 (file)
@@ -1 +1 @@
-4ad60bdba0f1aa068dcc42fb58b80d7912e36b1b
\ No newline at end of file
+c249d5da721b32f6fe409a5b55a5d49a58994fec
\ No newline at end of file
index f4dc24f045760e036eb2bc3164ebb4aa2f757fb2..cd6a074a8605c8673666a7c43e4398e2bf4b8818 100644 (file)
@@ -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;
   }