From d0f0d77474ac3630a2d1fca2f819ef67bdfff0fb Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 19 Oct 2022 22:16:39 -0400
Subject: [PATCH] Fix leak of tex layer objects during LLLocalTextureObject
 destruction

---
 indra/llappearance/lllocaltextureobject.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp
index 3f564ec3de3..0481326e9e9 100644
--- a/indra/llappearance/lllocaltextureobject.cpp
+++ b/indra/llappearance/lllocaltextureobject.cpp
@@ -76,6 +76,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) :
 
 LLLocalTextureObject::~LLLocalTextureObject()
 {
+	delete_and_clear(mTexLayers);
 }
 
 LLGLTexture* LLLocalTextureObject::getImage() const
-- 
GitLab