From 117066ce509bbc30ef1574b31be1cfe72c64ce8f Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 13 Aug 2007 14:56:44 +0000 Subject: [PATCH] Fix a page leak in btree balance routines that follows a malloc failure. This problem detected by the new soft-heap-limit testing. (CVS 4214) FossilOrigin-Name: bad661bb0bfabf982a2d711ea4165af130a4cae0 --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/btree.c | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index 06247a4574..4ac8e8da69 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C When\sloading\sa\sdatabase\sschema,\sdo\snot\sclear\sthe\sSQLITE_InternChanges\sflag.\sThis\sfixes\sthe\sproblem\sillustrated\sby\s(4211).\s(CVS\s4213) -D 2007-08-13T14:41:19 +C Fix\sa\spage\sleak\sin\sbtree\sbalance\sroutines\sthat\sfollows\sa\smalloc\sfailure.\nThis\sproblem\sdetected\sby\sthe\snew\ssoft-heap-limit\stesting.\s(CVS\s4214) +D 2007-08-13T14:56:44 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -68,7 +68,7 @@ F src/alter.c 24c81ed6734304326922d42430567d1ee368c81d F src/analyze.c 8d345472e0f4e44fc88f5cf489c16dcb77904525 F src/attach.c ba628db0c2b6a362f036d017bf1196cdfe4ebb37 F src/auth.c 5ea90bc93dfea46e9fe4bf531e14c7cd98219ecb -F src/btree.c b7141f51f7c4cd3fb45419510dce8b941b98836d +F src/btree.c be3f7d6d20f65c997f2f67d5b31d63aa74de6845 F src/btree.h 1d527bf61ed176f980c34999d5793a0fd45dcf8c F src/btreeInt.h ac1ab1fb624ffbe571786cd2bd9559f9ae336355 F src/build.c 59fd5782a728686148a6d30a5df283c177d22c1f @@ -525,7 +525,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 7d4cdff444b98b76a34bd85d0a43cda28e7dffe4 -R 67369a53b9b79d6642304c8698e2f200 -U danielk1977 -Z 3331cfbcfcebf80726e0c74ecb2e7084 +P 540a7b28bc37709056cfdb13286274ec5bdd8423 +R afb921f147a22c593ebfd95c9b9c9329 +U drh +Z 9c5ddd19c39d343909cd79d4e93a06b7 diff --git a/manifest.uuid b/manifest.uuid index aaedf3cc0b..38a127bb01 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -540a7b28bc37709056cfdb13286274ec5bdd8423 \ No newline at end of file +bad661bb0bfabf982a2d711ea4165af130a4cae0 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 09d0296548..1e3a43e476 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.395 2007/08/07 17:13:04 drh Exp $ +** $Id: btree.c,v 1.396 2007/08/13 14:56:44 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -4965,7 +4965,6 @@ static int balance_shallower(MemPage *pPage){ } } #endif - if( rc!=SQLITE_OK ) goto end_shallow_balance; releasePage(pChild); } end_shallow_balance: