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

Fix an OOM-recovery problem in the DELETE code generator.

FossilOrigin-Name: dc7be158b82ab9156d0fcdf3394f881eac4d23c3
This commit is contained in:
drh
2013-11-16 23:03:06 +00:00
parent 9612947260
commit 52a82e6966
3 changed files with 11 additions and 8 deletions

View File

@@ -433,7 +433,10 @@ void sqlite3DeleteFrom(
*/
nKey = nPk; /* OP_Found will use an unpacked key */
aToOpen = sqlite3DbMallocRaw(db, nIdx+2);
if( aToOpen==0 ) goto delete_from_cleanup;
if( aToOpen==0 ){
sqlite3WhereEnd(pWInfo);
goto delete_from_cleanup;
}
memset(aToOpen, 1, nIdx+1);
aToOpen[nIdx+1] = 0;
if( aiCurOnePass[0]>=0 ) aToOpen[aiCurOnePass[0]-iTabCur] = 0;