From: drh Date: Thu, 22 Jul 2004 17:10:10 +0000 (+0000) Subject: Another attempt at fixing the memory allocation problem in sqliteExprListDup(). ... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e1175bd650a7b6af8a0c487dac1a07fc86d64514;p=thirdparty%2Fsqlite.git Another attempt at fixing the memory allocation problem in sqliteExprListDup(). (CVS 1855) FossilOrigin-Name: 49c2ad8a754daebfdad230dc84e417e3d728c083 --- diff --git a/manifest b/manifest index 835d0dc268..558730cb30 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Bug\sfix\sin\sallocation\sof\sexpression\slists\safter\sa\smalloc()\sfailure.\s(CVS\s1854) -D 2004-07-22T16:32:14 +C Another\sattempt\sat\sfixing\sthe\smemory\sallocation\sproblem\sin\ssqliteExprListDup().\s(CVS\s1855) +D 2004-07-22T17:10:10 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -31,7 +31,7 @@ F src/copy.c 750e13828c3e4a293123e36aaa7cf0f22466248a F src/date.c 54befeafe3e2af041c22bcc49fd79f0396b75c4d F src/delete.c 82001c74882319f94dab5f6b92a27311b31092ae F src/encode.c fc8c51f0b61bc803ccdec092e130bebe762b0a2f -F src/expr.c b73ba23d007650c470a824b250e89245f6f41048 +F src/expr.c 75182704675da63ca1a5d3cfe7960229b819d5ec F src/func.c ab5c57f0ebb975e66cc13f09141247c2f7a2c293 F src/hash.c 9b56ef3b291e25168f630d5643a4264ec011c70e F src/hash.h 3247573ab95b9dd90bcca0307a75d9a16da1ccc7 @@ -191,7 +191,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P e5546f49c79155ed2695a1d58ca8044e79d60802 -R 349a82db98b95e9c0e049f81fb8fa677 +P 09494cab4f53a90e0d84abfec6806b4b2b3e118b +R 406e2902adc5e6bcbac84152e478f5ba U drh -Z f227e83bc185134edac495deaace1b23 +Z a33f76e279c61c5bed2b936d112330fd diff --git a/manifest.uuid b/manifest.uuid index 8d7327a4cc..c0e294b78d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -09494cab4f53a90e0d84abfec6806b4b2b3e118b \ No newline at end of file +49c2ad8a754daebfdad230dc84e417e3d728c083 \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index 7ea990fbf8..331f14f40b 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.114.2.2 2004/07/22 16:32:14 drh Exp $ +** $Id: expr.c,v 1.114.2.3 2004/07/22 17:10:10 drh Exp $ */ #include "sqliteInt.h" #include @@ -156,6 +156,7 @@ ExprList *sqliteExprListDup(ExprList *p){ pNew->nExpr = pNew->nAlloc = p->nExpr; pNew->a = pItem = sqliteMalloc( p->nExpr*sizeof(p->a[0]) ); if( pItem==0 ){ + sqliteFree(pNew); return 0; } for(i=0; inExpr; i++, pItem++){