Page MenuHomePhabricator

fix a memory leak in test_framework's key.py
ClosedPublic

Authored by markblundeberg on Feb 3 2019, 20:38.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCd7c45b8b4c08: fix a memory leak in test_framework's key.py
Summary

EC_KEY_set_private_key stores a *copy* of the provided bignum, thus the
private key here would be kept in memory permanently.

https://docs.huihoo.com/doxygen/openssl/1.0.1c/ec__key_8c.html

Test Plan

ran abc-replay-protection.py which uses this code; no problems occur.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Feb 3 2019, 20:38
Herald added a reviewer: Restricted Project. · View Herald TranscriptFeb 3 2019, 20:38
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix accepted this revision.Feb 4 2019, 12:16
This revision is now accepted and ready to land.Feb 4 2019, 12:16
Closed by commit rABCd7c45b8b4c08: fix a memory leak in test_framework's key.py (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>). · Explain WhyFeb 4 2019, 15:25
This revision was automatically updated to reflect the committed changes.