From a15410468b49125af36672fa20845da65f216dcc Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 19:42:14 -0400 Subject: Fix use after free in LLWorld::removeRegion --- indra/newview/llworld.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8abb49fba8..95cb98cad2 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -293,13 +293,13 @@ void LLWorld::removeRegion(const LLHost &host) mRegionRemovedSignal(regionp); - delete regionp; - updateWaterObjects(); //double check all objects of this region are removed. gObjectList.clearAllMapObjectsInRegion(regionp) ; //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; + + delete regionp; // Delete last to prevent use after free } -- cgit v1.2.3