-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 possible memory leak in walletconsole/Util.cpp #921
Conversation
Add missing call to `delete` in function `fileR`.
Codecov Report
@@ Coverage Diff @@
## master #921 +/- ##
==========================================
- Coverage 92.54% 92.53% -0.01%
==========================================
Files 418 418
Lines 12161 12162 +1
==========================================
Hits 11254 11254
- Misses 907 908 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the improvement.
Could you tell the exact way to find this finding? I was not able to reproduce it with
(see issue #922 ) |
@catenocrypt are you executing it on the non-fixed code? Because this is the output that I get:
My version of cppcheck is slightly older than yours but I don't think that it is the problem. |
Looks like I was wrong in the previous comment. The problem seems to actually be in the newer version of cppcheck. I installed the latest version (1.90) compiling from source and it doesn't detect the memory leak any more. |
Thanks for checking. I just wanted to reproduce, to see if there are any other similar findings. Because the finding you reported was a genuine memory leak, albeit minor and low probability. |
Description
Add missing call to
delete
in functionfileR
.Testing instructions
The error was detected using
cppcheck
. For example you can executecppcheck --quiet --force walletconsole/
Types of changes
Checklist
[WIP]
if necessary.