From 23c5d1315173dab0e86ebc2672c24c0f49b1de8d Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Mon, 13 Nov 2023 22:51:45 -0800 Subject: [PATCH] Models: Fix leak --- dGame/dInventory/Item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dGame/dInventory/Item.cpp b/dGame/dInventory/Item.cpp index 3b12f8b30..a585e60eb 100644 --- a/dGame/dInventory/Item.cpp +++ b/dGame/dInventory/Item.cpp @@ -433,7 +433,7 @@ void Item::DisassembleModel() { return; } - auto* doc = new tinyxml2::XMLDocument(); + std::unique_ptr doc(new tinyxml2::XMLDocument()); if (!doc) { return;