HomePhabricator

fix a memory leak in test_framework's key.py

Description

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.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2488

Details

Committed
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Feb 4 2019, 15:25
Pushed
markblundebergFeb 4 2019, 15:25
Reviewer
Restricted Project
Differential Revision
D2488: fix a memory leak in test_framework's key.py
Parents
rABC0d94d9df7e42: Add SCRIPT_ALLOW_SEGWIT_RECOVERY
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABCd7c45b8b4c08: fix a memory leak in test_framework's key.py (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Feb 4 2019, 15:25