From 4ecdb004e81a459ea63ebd7127e1c945df43f9ce Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 17 Jul 2017 18:55:36 +0300 Subject: Fix issues detected by coverity. --- src/resources/inventory/complexinventory.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/resources/inventory') diff --git a/src/resources/inventory/complexinventory.cpp b/src/resources/inventory/complexinventory.cpp index 4d77cfdde..c6037fe38 100644 --- a/src/resources/inventory/complexinventory.cpp +++ b/src/resources/inventory/complexinventory.cpp @@ -161,6 +161,7 @@ void ComplexInventory::setItem(const int index, equipped); item2->setInvIndex(index); item->addChild(item2, quantity); + delete item2; mItems[index] = item; mUsed ++; -- cgit v1.2.3-70-g09d2