From 2265ee51ab3cff74bcaaf784b48e18dbf4d52094 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Sun, 5 Apr 2026 09:24:53 -0500 Subject: [PATCH] fix(Core/OutdoorPvP): Fix use-after-free in DelCapturePoint (#25229) Co-authored-by: blinkysc --- src/server/game/OutdoorPvP/OutdoorPvP.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 88e210cfc..6f5ee4d81 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -215,15 +215,15 @@ bool OPvPCapturePoint::DelObject(uint32 type) bool OPvPCapturePoint::DelCapturePoint() { - sObjectMgr->DeleteGOData(m_capturePointSpawnId); - m_capturePointSpawnId = 0; - if (_capturePoint) { _capturePoint->SetRespawnTime(0); // not save respawn time _capturePoint->Delete(); } + sObjectMgr->DeleteGOData(m_capturePointSpawnId); + m_capturePointSpawnId = 0; + return true; }