From: sfan5 Date: Thu, 5 Mar 2020 21:36:21 +0000 (+0100) Subject: Fix memory leak in protocol 38 set_sky X-Git-Tag: 5.2.0~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb;p=oweals%2Fminetest.git Fix memory leak in protocol 38 set_sky --- 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 (...) {}