Skip to content

Commit

Permalink
Merge pull request #4 from mscdex/master
Browse files Browse the repository at this point in the history
fix memory leak on thrown exception
  • Loading branch information
gasteve committed Jul 27, 2013
2 parents 7e34088 + 239fc98 commit da56839
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/base58.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ base58_encode (const Arguments& args)
i = 0;
while (BN_cmp(bn, bn0) > 0) {
if (!BN_div(dv, rem, bn, bn58, ctx)) {
delete[] str;
return VException("BN_div failed");
}
if (bn != dv) {
Expand Down

0 comments on commit da56839

Please sign in to comment.