projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab3102b
)
Fix for coverity #29377: Properly free memory of 's'
author
Tobias Markus
<tobbi@mozilla-uk.org>
Sat, 14 Feb 2015 16:41:05 +0000
(17:41 +0100)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sat, 14 Feb 2015 16:41:05 +0000
(17:41 +0100)
src/addon/md5.cpp
patch
|
blob
|
history
diff --git
a/src/addon/md5.cpp
b/src/addon/md5.cpp
index
93dd1df
..
904e656
100644
(file)
--- a/
src/addon/md5.cpp
+++ b/
src/addon/md5.cpp
@@
-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) {