Page MenuHomePhabricator

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

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

Details

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
Branch
key_bugfix
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4851
Build 7765: Bitcoin ABC Buildbot (legacy)
Build 7764: arc lint + arc unit