Skip to content
Browse files

Merge pull request #1024 from nazgob/memory_leak_fix

fixed memory leak, memory allocated by new[] was freed by delete instead
  • Loading branch information...
2 parents 5070cb1 + d82a935 commit 5cb7a7d200c6fce3fe6541099a8955ee98e11941 @bakkdoor bakkdoor committed Jun 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 vm/util/bert.hpp
View
2 vm/util/bert.hpp
@@ -271,7 +271,7 @@ namespace bert {
if(term->contains_string_p() && term->string() == 0) {
char* buf = new char[term->integer() + 1];
if(!reader_.read(term->integer(), buf)) {
- delete buf;
+ delete[] buf;
return false;
}

0 comments on commit 5cb7a7d

Please sign in to comment.
Something went wrong with that request. Please try again.