mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +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: ac1f37a647e9ed1c00a901d26d9956a86c40117a
This commit is contained in:
@@ -67,7 +67,7 @@ const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
|
||||
int n;
|
||||
Table *pTab = pIdx->pTable;
|
||||
sqlite3 *db = sqlite3VdbeDb(v);
|
||||
pIdx->zColAff = (char *)sqlite3Malloc(pIdx->nColumn+2);
|
||||
pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+2);
|
||||
if( !pIdx->zColAff ){
|
||||
db->mallocFailed = 1;
|
||||
return 0;
|
||||
@@ -109,7 +109,7 @@ void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
|
||||
int i;
|
||||
sqlite3 *db = sqlite3VdbeDb(v);
|
||||
|
||||
zColAff = (char *)sqlite3Malloc(pTab->nCol+1);
|
||||
zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
|
||||
if( !zColAff ){
|
||||
db->mallocFailed = 1;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user