Skip to content

Commit

Permalink
Fix for coverity #29377: Properly free memory of 's'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Feb 14, 2015
1 parent ab3102b commit 3285879
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/addon/md5.cpp
Expand Up @@ -162,7 +162,11 @@ std::string MD5::hex_digest() {

s[32]='\0';

return s;
// Create string from 's'
std::string s_str = std::string(s);
delete[] s;

return s_str;
}

std::ostream& operator<<(std::ostream &stream, MD5 context) {
Expand Down

0 comments on commit 3285879

Please sign in to comment.