From: drh Date: Thu, 19 Jan 2006 17:42:50 +0000 (+0000) Subject: Make sure sqlite3_thread_cleanup() does not try to allocate memory. (CVS 2979) X-Git-Tag: version-3.6.10~3188 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f98477b84621a2c549e1c2fe7c9ef5f40304b52e;p=thirdparty%2Fsqlite.git Make sure sqlite3_thread_cleanup() does not try to allocate memory. (CVS 2979) FossilOrigin-Name: 0208e4221a2d90b5ae0755061c345d3351a30da8 --- diff --git a/manifest b/manifest index c4f3db5f7a..73f18eaa5b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sthe\s#ifdef\saround\ssqlite3OutstandingMallocs()\sin\stest1.c.\s(CVS\s2978) -D 2006-01-19T11:28:07 +C Make\ssure\ssqlite3_thread_cleanup()\sdoes\snot\stry\sto\sallocate\smemory.\s(CVS\s2979) +D 2006-01-19T17:42:51 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -48,7 +48,7 @@ F src/hash.c 8747cf51d12de46512880dfcf1b68b4e24072863 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84 F src/insert.c 4f338c85c26f8efabc77d5eb66f8ea63717789dc F src/legacy.c 0fd27db5e07a46853b9876baaa370b40e75a9b40 -F src/main.c fe0ec40a2cc4d405a6f18884302f61b2b9961351 +F src/main.c 439168db0a830efd0b9e7325aff39adc5524a1b5 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217 F src/os.c 1d1a61cdf150e9f9520a3bc787c8465148ea2e78 F src/os.h e4637eadcd5a9ca079029078d31751ae295fb05e @@ -342,7 +342,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 950798326860de40926e82e10134f09e6ea86245 -R 8aac43680a02cf4bd620fa26a626200d +P 218c6184c8edec22f9b56b3c9446d27fda9c1e00 +R 1bceb1e22a686481ca5f53186e58ea75 U drh -Z ad072caf18fdc9767a40c11dca64eaaf +Z 93ab8d9821d0109154bcc26ca1eba6f4 diff --git a/manifest.uuid b/manifest.uuid index 8a20ab4263..0a79d07125 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -218c6184c8edec22f9b56b3c9446d27fda9c1e00 \ No newline at end of file +0208e4221a2d90b5ae0755061c345d3351a30da8 \ No newline at end of file diff --git a/src/main.c b/src/main.c index 504e1ffda9..b27d4f86dc 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.328 2006/01/18 16:51:35 danielk1977 Exp $ +** $Id: main.c,v 1.329 2006/01/19 17:42:51 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -1113,9 +1113,9 @@ int sqlite3_enable_shared_cache(int enable){ ** data for this thread has been deallocated. */ void sqlite3_thread_cleanup(void){ - ThreadData *pTd = sqlite3ThreadData(); + ThreadData *pTd = sqlite3OsThreadSpecificData(0); if( pTd ){ memset(pTd, 0, sizeof(*pTd)); + sqlite3OsThreadSpecificData(-1); } - sqlite3ReleaseThreadData(); }