From b5fc9c3254a1bb83d1d454cea95db85f36f40ccf Mon Sep 17 00:00:00 2001
From: Aimee Linden <aimee@lindenlab.com>
Date: Mon, 23 Aug 2010 13:12:56 +0100
Subject: [PATCH] VWR-20899 FIXED Minor potential memory leak in
 LLFlatListView::addItem

---
 indra/llui/llflatlistview.cpp        | 3 +++
 indra/llui/llflatlistview.h          | 2 ++
 indra/newview/llinventoryitemslist.h | 1 +
 indra/newview/llwearableitemslist.h  | 1 +
 4 files changed, 7 insertions(+)

diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index f266af03ee..b28399a36b 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -87,6 +87,9 @@ bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*
 		mItemsPanel->addChild(item);
 		break;
 	default:
+		LL_WARNS("") << "Unsupported position." << LL_ENDL;
+		delete new_pair;
+		return false;
 		break;
 	}
 	
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index 8667af048b..afd0176d98 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -54,6 +54,7 @@
  */
 class LLFlatListView : public LLScrollContainer, public LLEditMenuHandler
 {
+	LOG_CLASS(LLFlatListView);
 public:
 
 	/**
@@ -448,6 +449,7 @@ private:
  */
 class LLFlatListViewEx : public LLFlatListView
 {
+	LOG_CLASS(LLFlatListViewEx);
 public:
 	struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
 	{
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 17131549e7..ca90427659 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -38,6 +38,7 @@ class LLViewerInventoryItem;
 
 class LLInventoryItemsList : public LLFlatListViewEx
 {
+	LOG_CLASS(LLInventoryItemsList);
 public:
 	struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params>
 	{
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 4806fb35bf..854c37c2c1 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -384,6 +384,7 @@ private:
  */
 class LLWearableItemsList : public LLInventoryItemsList
 {
+	LOG_CLASS(LLWearableItemsList);
 public:
 	/**
 	 * Context menu.
-- 
GitLab