From ff647e657a6c3a72c8c438a9cbc3ce73c6cdbbec Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 10 Aug 2021 08:45:52 -0400
Subject: [PATCH] Fix leak in notification floater

---
 indra/newview/llfloaternotificationstabbed.cpp | 5 ++---
 indra/newview/llfloaternotificationstabbed.h   | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp
index c13bb3a75ba..e48fd8d7f5f 100644
--- a/indra/newview/llfloaternotificationstabbed.cpp
+++ b/indra/newview/llfloaternotificationstabbed.cpp
@@ -45,7 +45,6 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL
     mGroupNoticeMessageList(NULL),
     mTransactionMessageList(NULL),
     mSystemMessageList(NULL),
-    mNotificationsSeparator(NULL),
     mNotificationsTabContainer(NULL),
     NOTIFICATION_TABBED_ANCHOR_NAME("notification_well_panel"),
     IM_WELL_ANCHOR_NAME("im_well_panel"),
@@ -54,7 +53,7 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL
 {
     setOverlapsScreenChannel(true);
     mNotificationUpdates.reset(new NotificationTabbedChannel(this));
-    mNotificationsSeparator = new LLNotificationSeparator();
+    mNotificationsSeparator = std::make_unique<LLNotificationSeparator>();
 }
 
 //---------------------------------------------------------------------------------
@@ -117,7 +116,7 @@ void LLFloaterNotificationsTabbed::setSysWellChiclet(LLSysWellChiclet* chiclet)
 //---------------------------------------------------------------------------------
 LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed()
 {
-    delete mNotificationsSeparator;
+    mNotificationsSeparator.reset();
 }
 
 //---------------------------------------------------------------------------------
diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h
index 8dd20b18c42..c0ad0949456 100644
--- a/indra/newview/llfloaternotificationstabbed.h
+++ b/indra/newview/llfloaternotificationstabbed.h
@@ -162,7 +162,7 @@ class LLFloaterNotificationsTabbed : public LLTransientDockableFloater
     LLNotificationListView*	mGroupNoticeMessageList;
     LLNotificationListView*	mTransactionMessageList;
     LLNotificationListView*	mSystemMessageList;
-    LLNotificationSeparator* mNotificationsSeparator;
+    std::unique_ptr<LLNotificationSeparator> mNotificationsSeparator;
     LLTabContainer* mNotificationsTabContainer;
     LLButton*	mDeleteAllBtn;
     LLButton*	mCollapseAllBtn;
-- 
GitLab