1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Fix handling of a failed malloc() in various places (CVS 1604)

FossilOrigin-Name: 7d8edce4c12d075acbc6bac6758aabb2769f983a
This commit is contained in:
danielk1977
2004-06-16 10:39:23 +00:00
parent eac7a362f6
commit 5c4c77878d
4 changed files with 24 additions and 14 deletions

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.69 2004/06/15 13:36:30 danielk1977 Exp $
** $Id: func.c,v 1.70 2004/06/16 10:39:24 danielk1977 Exp $
*/
#include <ctype.h>
#include <math.h>
@@ -904,8 +904,7 @@ static void minmaxStep(sqlite3_context *context, int argc, sqlite3_value **argv)
Mem *pArg = (Mem *)argv[0];
Mem *pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
if( SQLITE_NULL==sqlite3_value_type(argv[0]) ) return;
if( !pBest || SQLITE_NULL==sqlite3_value_type(argv[0]) ) return;
if( pBest->flags ){
CollSeq *pColl = sqlite3GetFuncCollSeq(context);
/* This step function is used for both the min() and max() aggregates,