mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree()
and all memory from sqlite3_malloc() is freed by sqlite3_free(). FossilOrigin-Name: 629e38a8c9e31111e351fe4625a5835576d23584
This commit is contained in:
@@ -1351,7 +1351,7 @@ static char *createTableStmt(sqlite3 *db, Table *p){
|
||||
zEnd = "\n)";
|
||||
}
|
||||
n += 35 + 6*p->nCol;
|
||||
zStmt = sqlite3Malloc( n );
|
||||
zStmt = sqlite3DbMallocRaw(0, n);
|
||||
if( zStmt==0 ){
|
||||
db->mallocFailed = 1;
|
||||
return 0;
|
||||
@@ -2800,7 +2800,7 @@ Index *sqlite3CreateIndex(
|
||||
/* Clean up before exiting */
|
||||
exit_create_index:
|
||||
if( pIndex ){
|
||||
sqlite3_free(pIndex->zColAff);
|
||||
sqlite3DbFree(db, pIndex->zColAff);
|
||||
sqlite3DbFree(db, pIndex);
|
||||
}
|
||||
sqlite3ExprListDelete(db, pList);
|
||||
|
||||
Reference in New Issue
Block a user