From: drh Date: Thu, 30 Apr 2009 05:40:34 +0000 (+0000) Subject: Fix a memory leak introduced in the previous check-in. (CVS 6574) X-Git-Tag: version-3.6.15~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c197475495093ebd26a5d93c7e67ea4c932151e;p=thirdparty%2Fsqlite.git Fix a memory leak introduced in the previous check-in. (CVS 6574) FossilOrigin-Name: f082bf36051fef92ddda0339777a00cd1f0ba988 --- diff --git a/manifest b/manifest index 3b714cef12..3c290a81e7 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Take\scare\snot\sto\sleave\sa\szombie\sattached\sdatabase\sif\sthe\sattachment\sfails\ndue\sto\san\sencoding\smismatch.\s\sUpdate\sattach\slogic\sto\salways\suse\sdynamically\nallocated\serror\smessage\sstrings.\s(CVS\s6573) -D 2009-04-30T05:19:04 +C Fix\sa\smemory\sleak\sintroduced\sin\sthe\sprevious\scheck-in.\s(CVS\s6574) +D 2009-04-30T05:40:34 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -101,7 +101,7 @@ F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad F src/alter.c 8ab5824bde0a03dae5829f61557ab7c72757000a F src/analyze.c e239496cfb5394ac8867f1c112905ddab8d01cd9 -F src/attach.c 38e6ad955ac54be32d2daa55fffdfbdc7cd01ace +F src/attach.c 2acdbf4bbca681405a3fd3b1c75356be10becb62 F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627 F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d F src/bitvec.c ef370407e03440b0852d05024fb016b14a471d3d @@ -725,7 +725,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 8bf60b24ffcf6ac15f41eaa7f976b810e0c66734 -R 32e5b87554b74f04442dc5abc482ed4a +P a6cb4002ada311b56fa2b7430b98b9a0fa698a01 +R 66a9f4fcfdc6b7afc02ad657124691ef U drh -Z f244ab0788ad7a9d214fdf73c2314ea5 +Z 1a309d6a333ba8af89e2e9af078bec90 diff --git a/manifest.uuid b/manifest.uuid index 359e7b357a..3061f83c6d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a6cb4002ada311b56fa2b7430b98b9a0fa698a01 \ No newline at end of file +f082bf36051fef92ddda0339777a00cd1f0ba988 \ No newline at end of file diff --git a/src/attach.c b/src/attach.c index 076261534b..d5495361b6 100644 --- a/src/attach.c +++ b/src/attach.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the ATTACH and DETACH commands. ** -** $Id: attach.c,v 1.86 2009/04/30 05:19:04 drh Exp $ +** $Id: attach.c,v 1.87 2009/04/30 05:40:34 drh Exp $ */ #include "sqliteInt.h" @@ -200,6 +200,7 @@ static void attachFunc( db->nDb = iDb; if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){ db->mallocFailed = 1; + sqlite3DbFree(db, zErrDyn); zErrDyn = sqlite3MPrintf(db, "out of memory"); }else if( zErrDyn==0 ){ zErrDyn = sqlite3MPrintf(db, "unable to open database: %s", zFile);