mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Half-way through a major refactoring of the memory allocation.
I have not even attempted to compile so I am certain there are countless errors. (CVS 4231) FossilOrigin-Name: deb7ecd65f7b83eaf0ba610eeef3b0ede61db1c3
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: legacy.c,v 1.18 2007/05/04 13:15:56 drh Exp $
|
||||
** $Id: legacy.c,v 1.19 2007/08/16 04:30:40 drh Exp $
|
||||
*/
|
||||
|
||||
#include "sqliteInt.h"
|
||||
@@ -66,7 +66,7 @@ int sqlite3_exec(
|
||||
nCallback = 0;
|
||||
|
||||
nCol = sqlite3_column_count(pStmt);
|
||||
azCols = sqliteMalloc(2*nCol*sizeof(const char *) + 1);
|
||||
azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char *) + 1);
|
||||
if( azCols==0 ){
|
||||
goto exec_out;
|
||||
}
|
||||
@@ -108,13 +108,13 @@ int sqlite3_exec(
|
||||
}
|
||||
}
|
||||
|
||||
sqliteFree(azCols);
|
||||
sqlite3_free(azCols);
|
||||
azCols = 0;
|
||||
}
|
||||
|
||||
exec_out:
|
||||
if( pStmt ) sqlite3_finalize(pStmt);
|
||||
if( azCols ) sqliteFree(azCols);
|
||||
if( azCols ) sqlite3_free(azCols);
|
||||
|
||||
rc = sqlite3ApiExit(0, rc);
|
||||
if( rc!=SQLITE_OK && rc==sqlite3_errcode(db) && pzErrMsg ){
|
||||
|
||||
Reference in New Issue
Block a user