]> git.lizzy.rs Git - minetest.git/commitdiff
Fix memory leak: remove InventoryAction after sending and applying
authorPilzAdam <pilzadam@minetest.net>
Fri, 10 May 2013 22:12:14 +0000 (00:12 +0200)
committerPilzAdam <pilzadam@minetest.net>
Fri, 10 May 2013 22:12:14 +0000 (00:12 +0200)
src/client.cpp

index 56505c66c07875ca525ee5ed03cb254d244bedcd..329496db7519a92f78407834221d2a07742de4a8 100644 (file)
@@ -2555,6 +2555,9 @@ void Client::inventoryAction(InventoryAction *a)
                Predict some local inventory changes
        */
        a->clientApply(this, this);
+
+       // Remove it
+       delete a;
 }
 
 ClientActiveObject * Client::getSelectedActiveObject(