mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix a memory leak in the fuzzcheck utility.
FossilOrigin-Name: dfd6d9f4fbe902086f9158dfa5f37e781765a683
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user