1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Remove unused malloc failure test. (Ticket #1976)

Also include fixes for other problems
discovered while investigating ticket #1976. (CVS 3415)

FossilOrigin-Name: f4ab546b2e8105422fb1baa2b86e688b5d19f20e
This commit is contained in:
drh
2006-09-13 19:21:28 +00:00
parent 8f116cc15c
commit 235a818e61
5 changed files with 23 additions and 25 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.34 2006/09/11 00:34:22 drh Exp $
** $Id: vtab.c,v 1.35 2006/09/13 19:21:28 drh Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
@@ -295,6 +295,7 @@ static int vtabCallConstructor(
const char *const*azArg = (const char *const*)pTab->azModuleArg;
int nArg = pTab->nModuleArg;
char *zErr = 0;
char *zModuleName = sqlite3MPrintf("%s", pTab->zName);
assert( !db->pVTab );
assert( xConstruct );
@@ -312,7 +313,7 @@ static int vtabCallConstructor(
if( SQLITE_OK!=rc ){
if( zErr==0 ){
*pzErr = sqlite3MPrintf("vtable constructor failed: %s", pTab->zName);
*pzErr = sqlite3MPrintf("vtable constructor failed: %s", zModuleName);
}else {
*pzErr = sqlite3MPrintf("%s", zErr);
sqlite3_free(zErr);
@@ -326,6 +327,7 @@ static int vtabCallConstructor(
rc = rc2;
}
db->pVTab = 0;
sqliteFree(zModuleName);
return rc;
}