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

Test for an OOM condition in resolveAlias().

FossilOrigin-Name: 322eca7f6ad2234059669015aabb773a790e8bc3da95431c9c851ff5342c969b
This commit is contained in:
drh
2019-09-26 16:08:35 +00:00
parent a51ddb1ed7
commit d79cd92b23
3 changed files with 13 additions and 9 deletions

View File

@@ -97,7 +97,11 @@ static void resolveAlias(
pExpr->flags |= EP_MemToken;
}
if( ExprHasProperty(pExpr, EP_WinFunc) ){
pExpr->y.pWin->pOwner = pExpr;
if( pExpr->y.pWin!=0 ){
pExpr->y.pWin->pOwner = pExpr;
}else{
assert( db->mallocFailed );
}
}
sqlite3DbFree(db, pDup);
}