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

Fix a potential memory use-after-free problem following an OOM error.

FossilOrigin-Name: 767ccb1fa11b3e7b895fb8c2e91f79e3b4202907
This commit is contained in:
drh
2014-03-04 18:06:04 +00:00
parent ed79b45cf7
commit d1053a4314
3 changed files with 8 additions and 7 deletions

View File

@@ -122,6 +122,7 @@ int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){
}
if( pMem->zMalloc==0 ){
VdbeMemRelease(pMem);
pMem->z = 0;
pMem->flags = MEM_Null;
return SQLITE_NOMEM;
}