aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-01-02 21:42:33 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-01-02 21:42:33 +0200
commit3e6f824e6cb8e765d691d074077f9aac87fd0931 (patch)
tree3f53d9a6cf739945858271fc51d01e3fa880b75b
parent6286c555d4bd4597e19c8b05d44f0ef364ceffb0 (diff)
downloadminetest-3e6f824e6cb8e765d691d074077f9aac87fd0931.tar.gz
minetest-3e6f824e6cb8e765d691d074077f9aac87fd0931.tar.bz2
minetest-3e6f824e6cb8e765d691d074077f9aac87fd0931.zip
Use free rather than delete for malloc'd memory
-rw-r--r--src/client.cpp2
-rw-r--r--src/server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index e3b250b32..aca38b166 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1343,7 +1343,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
<<name << ": server ->"<<sha1_texture <<" client -> "<<digest_string<<std::endl;
}
- delete(digest);
+ free(digest);
}
}
diff --git a/src/server.cpp b/src/server.cpp
index b76d0e41a..8bf9eee38 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -4307,7 +4307,7 @@ void Server::PrepareTextures() {
unsigned char *digest = sha1.getDigest();
std::string digest_string = base64_encode(digest, 20);
- delete(digest);
+ free(digest);
// Put in list
this->m_Textures[tname] = TextureInformation(tpath,digest_string);