Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for missing delete in case of exception. #1291

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

optout21
Copy link
Contributor

@optout21 optout21 commented Feb 8, 2021

Description

Fix for low-prob. minor memory leak, delete[] was missing in a catch branch. Fixes #1286 .

Testing instructions

Unit tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • I have read the guidelines for adding a new blockchain
  • If there is a related Issue, mention it in the description (e.g. Fixes #<issue_number> ).

@optout21 optout21 requested a review from hewigovens as a code owner February 8, 2021 16:10
@optout21 optout21 requested a review from madcake February 8, 2021 16:10
@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #1291 (f8d9892) into master (efc454c) will decrease coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1291      +/-   ##
==========================================
- Coverage   95.31%   95.28%   -0.03%     
==========================================
  Files         433      433              
  Lines       13172    13121      -51     
==========================================
- Hits        12555    12503      -52     
- Misses        617      618       +1     
Impacted Files Coverage Δ
walletconsole/lib/Util.cpp 89.74% <50.00%> (-2.26%) ⬇️
src/Bitcoin/CashAddress.cpp 82.22% <0.00%> (-2.40%) ⬇️
src/interface/TWStoredKey.cpp 91.57% <0.00%> (-1.06%) ⬇️
src/NEO/Witness.h 85.71% <0.00%> (-0.96%) ⬇️
src/NEO/Address.cpp 77.77% <0.00%> (-0.80%) ⬇️
src/NEO/ReadData.cpp 76.66% <0.00%> (-0.76%) ⬇️
src/Algorand/Address.cpp 87.09% <0.00%> (-0.41%) ⬇️
src/Stellar/Address.cpp 88.88% <0.00%> (-0.31%) ⬇️
src/Nimiq/Address.cpp 91.30% <0.00%> (-0.25%) ⬇️
src/EOS/Asset.cpp 84.61% <0.00%> (-0.24%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efc454c...22063f3. Read the comment docs.

@optout21 optout21 merged commit 9e072b9 into master Feb 9, 2021
@optout21 optout21 deleted the ar/walletcore-catch-delete branch February 9, 2021 09:17
cornbread78 pushed a commit to cornbread78/wallet-core that referenced this pull request Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak vulnerability in try-catch in walletconsole/Util.cpp
4 participants