Skip to content

Commit

Permalink
fix memory leak from demangle
Browse files Browse the repository at this point in the history
Fix memory leak that was introduced by a coding mistake
in an earlier attempt to fix a leak on realloc:

  dd8af25 fix a memory leak when __cxa_demangle reallocs

The value of _empty was accidentally negated.

Closes #171
  • Loading branch information
iillyyaa committed Sep 22, 2020
1 parent 1efdd14 commit 84b1111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class handle {

void update(T new_val) {
_val = new_val;
_empty = static_cast<bool>(new_val);
_empty = !static_cast<bool>(new_val);
}

operator const dummy *() const {
Expand Down

0 comments on commit 84b1111

Please sign in to comment.