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

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Feb 3 2019, 19:59
markblundebergPushed on Feb 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