1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Change two MallocZero() calls into MallocRaw() to avoid unnecessary memset().

FossilOrigin-Name: ff5e733cbffd73faa4046e0f1c7f24bb6e131738
This commit is contained in:
drh
2017-02-16 17:18:07 +00:00
parent c5f4816fc5
commit 5c258dc1cc
4 changed files with 11 additions and 10 deletions

View File

@@ -73,7 +73,7 @@ int sqlite3_exec(
(SQLITE_DONE==rc && !callbackIsInit
&& db->flags&SQLITE_NullCallback)) ){
if( !callbackIsInit ){
azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);
azCols = sqlite3DbMallocRaw(db, (2*nCol+1)*sizeof(const char*));
if( azCols==0 ){
goto exec_out;
}
@@ -94,6 +94,7 @@ int sqlite3_exec(
goto exec_out;
}
}
azVals[i] = 0;
}
if( xCallback(pArg, nCol, azVals, azCols) ){
/* EVIDENCE-OF: R-38229-40159 If the callback function to