aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-03-05 22:36:21 +0100
committerGitHub <noreply@github.com>2020-03-05 22:36:21 +0100
commit9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb (patch)
treeda33c7964f27505d23e5ea3b0a86a861976eb9a1 /src/network
parentdb95ff22865e8aa5eb512a1ac1f2f8715c18e3c8 (diff)
downloadminetest-9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb.tar.gz
minetest-9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb.tar.bz2
minetest-9ca0b3739cbaceaa291ac5062ab219e0aa7c49cb.zip
Fix memory leak in protocol 38 set_sky
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp3
1 files changed, 1 insertions, 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<std::string>* params = new std::vector<std::string>;
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 (...) {}