/* Attempt to reallocate p. If the reallocation fails, then free p and set the mallocFailed flag in the database connection.  */
SQLITE_PRIVATE void * sqlite3DbReallocOrFree(sqlite3 *, void *, int)
/* Attempt to reallocate p. If the reallocation fails, then free p and set the mallocFailed flag in the database connection.  */
SQLITE_PRIVATE void * sqlite3DbReallocOrFree(sqlite3 *, void *, int)
{
  void *pNew;
  pNew = sqlite3DbRealloc(db, p, n);
  if( !pNew ){
    sqlite3DbFree(db, p);
  }
  return pNew;
}