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

Fix a couple of fairly obscure cases where an assert() could fail following a malloc failure. (CVS 6360)

FossilOrigin-Name: cc0d925669ddeb55048e88aa5b4f658be60b0962
This commit is contained in:
danielk1977
2009-03-19 18:51:06 +00:00
parent 65a2ea1155
commit 238746a650
10 changed files with 102 additions and 49 deletions

View File

@@ -12,7 +12,7 @@
**
** This file contains code used to implement incremental BLOB I/O.
**
** $Id: vdbeblob.c,v 1.29 2009/03/05 03:48:07 shane Exp $
** $Id: vdbeblob.c,v 1.30 2009/03/19 18:51:07 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -248,8 +248,8 @@ int sqlite3_blob_open(
blob_open_out:
zErr[sizeof(zErr)-1] = '\0';
if( rc!=SQLITE_OK || db->mallocFailed ){
sqlite3_finalize((sqlite3_stmt *)v);
if( v && (rc!=SQLITE_OK || db->mallocFailed) ){
sqlite3VdbeFinalize(v);
}
sqlite3Error(db, rc, (rc==SQLITE_OK?0:zErr));
rc = sqlite3ApiExit(db, rc);