]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a memory leak that can occur following a malloc() failure. (CVS 4628)
authordanielk1977 <danielk1977@noemail.net>
Thu, 13 Dec 2007 19:15:02 +0000 (19:15 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Thu, 13 Dec 2007 19:15:02 +0000 (19:15 +0000)
FossilOrigin-Name: 993a213024964f4411a9c25c10810543c8089d07

manifest
manifest.uuid
src/select.c

index 82b742ac4c7fca3d994a2e8bfd77e5070af5e08c..ac28a8726c422d1a1dd9c4c2b161beaf7fedb027 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthe\slocation\sof\sa\s#include\sin\stest_thread.c.\s\sticket\s#2826.\s(CVS\s4627)
-D 2007-12-13T18:29:36
+C Fix\sa\smemory\sleak\sthat\scan\soccur\sfollowing\sa\smalloc()\sfailure.\s(CVS\s4628)
+D 2007-12-13T19:15:03
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in e66cf1239b8009b073156b36f92e68657d4755da
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -131,7 +131,7 @@ F src/pragma.c 0246032dbe681dded8710ac43eaf654eead1434e
 F src/prepare.c f811fdb6fd4a82cca673a6e1d5b041d6caf567f1
 F src/printf.c eb27822ba2eec669161409ca31279a24c26ac910
 F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da
-F src/select.c 14c4a8e9d784bfc4bfbb1576226f2bc0b9fbfd10
+F src/select.c 7eedf1fc810aa634aa625d07b172f6f1d63126b4
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c c97be281cfc3dcb14902f45e4b16f20038eb83ff
 F src/sqlite.h.in b16a7127dad4a3e5b1b26b3d64241f3373aa12ea
@@ -600,7 +600,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 49b67adfe9f15dfac34cb30f965920bf61bceee7
-R 6fead2df8c6a290b78ec55564e2f4b5d
-U drh
-Z d1655bfb7a138064325a9c5e291da80a
+P 6129fce873da5adb05473129e610198a30e43ac8
+R c94e2287b85c030d5ecb43fa975ab920
+U danielk1977
+Z 18c07b61bb74a95bf1b1340e5ca961dc
index 50d7290ff0f97f4e80e4e7d11b874981a713fa06..b32699aa23138707df7272ae51abefe542b23c68 100644 (file)
@@ -1 +1 @@
-6129fce873da5adb05473129e610198a30e43ac8
\ No newline at end of file
+993a213024964f4411a9c25c10810543c8089d07
\ No newline at end of file
index 02ec6974099ce334adfd02c6f89a8fc827979939..ced5883c9cd0e3c9874d48a18bd38884bc7b76ab 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: select.c,v 1.368 2007/12/13 07:58:51 danielk1977 Exp $
+** $Id: select.c,v 1.369 2007/12/13 19:15:03 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 
@@ -1465,6 +1465,7 @@ static int matchOrderByTermToExprList(
     sqlite3 *db = pParse->db;
     char *zCol = sqlite3NameFromToken(db, &pE->token);
     if( db->mallocFailed ){
+      sqlite3_free(zCol);
       return -1;
     }
     for(i=0; i<pEList->nExpr; i++){