Fix a memory leak in the fuzzcheck utility.

FossilOrigin-Name: dfd6d9f4fbe902086f9158dfa5f37e781765a683
This commit is contained in:
drh 2015-11-13 20:52:49 +00:00
parent ce6cbf9ff4
commit 6653fbe91f
4 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\s"--enable-static-shell"\soption\sto\sthe\samalgamation\sautoconf\sscript.\sIf\sset\s(the\sdefault)\sthe\scompiled\sshell\stool\sis\sstatically\slinked\sagainst\ssqlite3.o.\sOtherwise,\sit\sis\slinked\sagainst\slibsqlite3.so.
D 2015-11-13T16:59:00.913
C Fix\sa\smemory\sleak\sin\sthe\sfuzzcheck\sutility.
D 2015-11-13T20:52:49.277
F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc e928e68168df69b353300ac87c10105206653a03
@ -753,7 +753,7 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
F test/fuzz3.test 53fabcd5f0f430f8b221282f6c12c4d0903c21eb
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26
F test/fuzzcheck.c ee926f1d4090d053ed542899720d4e4d30811bcc
F test/fuzzcheck.c 7c61352f20a28429b221f406f3854cf9c912f63b
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
@ -949,7 +949,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
F test/releasetest.tcl 59a3682dbfddb141c86c7d0fc407155a5517a1db
F test/releasetest.tcl 30cf0851a6fb0343b65f27dc89ab7bed3c3cc77d
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
@ -1403,7 +1403,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 8882d1f3ef0fc53d7c19918c3af43c5bdd79e88f
R 2523a6a90a9922264d529f15493b3cc7
U dan
Z 7b17a89a058e0f8db79be4630f564198
P 499a02a34316cada9e197ef1d2e77c4cd75c41be
R ffa98089b86396d49df8e3ddc3e3caf3
U drh
Z 93ac31c4a1bdc9cbd2a68f004b288c50

View File

@ -1 +1 @@
499a02a34316cada9e197ef1d2e77c4cd75c41be
dfd6d9f4fbe902086f9158dfa5f37e781765a683

View File

@ -838,6 +838,7 @@ int main(int argc, char **argv){
int nMem = 0; /* Memory limit */
char *zExpDb = 0; /* Write Databases to files in this directory */
char *zExpSql = 0; /* Write SQL to files in this directory */
void *pHeap = 0; /* Heap for use by SQLite */
iBegin = timeOfDay();
#ifdef __unix__
@ -1085,7 +1086,6 @@ int main(int argc, char **argv){
/* Limit available memory, if requested */
if( nMem>0 ){
void *pHeap;
sqlite3_shutdown();
pHeap = malloc(nMem);
if( pHeap==0 ){
@ -1184,5 +1184,6 @@ int main(int argc, char **argv){
sqlite3_libversion(), sqlite3_sourceid());
}
free(azSrcDb);
free(pHeap);
return 0;
}

View File

@ -439,6 +439,7 @@ proc run_slave_test {} {
foreach {title dir configOpts testtarget makeOpts cflags opts} $T {}
# Create and switch to the test directory.
set ::env(SQLITE_TMPDIR) [file normalize $dir]
trace_cmd file mkdir $dir
trace_cmd cd $dir
catch {file delete core}