From 22dc6de993cfc3de497edbce998a2bad719809d0 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 19:41:46 -0400 Subject: Fix trivial memory leaks in note card processing, chat history, and task inventory --- indra/newview/llpreviewnotecard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpreviewnotecard.cpp') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 3fd4f51559..33656566d1 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -255,7 +255,7 @@ void LLPreviewNotecard::loadAsset() else { LLHost source_sim = LLHost(); - LLSD* user_data = new LLSD(); + LLSD* user_data = nullptr; if (mObjectUUID.notNull()) { LLViewerObject *objectp = gObjectList.findObject(mObjectUUID); @@ -274,6 +274,7 @@ void LLPreviewNotecard::loadAsset() mAssetStatus = PREVIEW_ASSET_LOADED; return; } + user_data = new LLSD(); user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID); } else -- cgit v1.2.3