Use free rather than delete for malloc'd memory

This commit is contained in:
Perttu Ahola 2012-01-02 21:42:33 +02:00
parent 6286c555d4
commit 3e6f824e6c
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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);