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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user