From 9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 5 Mar 2020 22:36:21 +0100 Subject: [PATCH] Fix memory leak in protocol 38 set_sky --- src/network/clientpackethandler.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index f6de9cd8b..0a9f8c212 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -1244,12 +1244,11 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt) skybox.bgcolor = video::SColor(readARGB8(is)); skybox.type = std::string(deSerializeString(is)); u16 count = readU16(is); - std::vector* params = new std::vector; for (size_t i = 0; i < count; i++) skybox.textures.emplace_back(deSerializeString(is)); - bool clouds = true; + skybox.clouds = true; try { skybox.clouds = readU8(is); } catch (...) {} -- 2.25.1