mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Better handle malloc() failures in the "echo" virtual table test module. (CVS 3855)
FossilOrigin-Name: 6881f9212fea0e0a98045b0acc60151eeaf5839e
This commit is contained in:
10
src/test8.c
10
src/test8.c
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test8.c,v 1.45 2007/03/30 14:56:35 danielk1977 Exp $
|
||||
** $Id: test8.c,v 1.46 2007/04/18 17:04:01 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@@ -269,9 +269,13 @@ static int echoDeclareVtab(
|
||||
-1, &pStmt, 0);
|
||||
sqlite3_bind_text(pStmt, 1, argv[3], -1, 0);
|
||||
if( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
int rc2;
|
||||
const char *zCreateTable = (const char *)sqlite3_column_text(pStmt, 0);
|
||||
sqlite3_declare_vtab(db, zCreateTable);
|
||||
rc = sqlite3_finalize(pStmt);
|
||||
rc = sqlite3_declare_vtab(db, zCreateTable);
|
||||
rc2 = sqlite3_finalize(pStmt);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = rc2;
|
||||
}
|
||||
} else {
|
||||
rc = sqlite3_finalize(pStmt);
|
||||
if( rc==SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user