diff options
| author | Giel van Schijndel <[email protected]> | 2012-06-24 12:34:15 +0200 |
|---|---|---|
| committer | Giel van Schijndel <[email protected]> | 2012-06-24 12:34:15 +0200 |
| commit | 415a87ef363396fe689ec452a30d36b1752eab2e (patch) | |
| tree | 1f68453bf98ac1a4a94394e2792fd3175480cd52 /src/key.cpp | |
| parent | *Always* send a shutdown signal to enable custom shutdown actions (diff) | |
| parent | Merge pull request #1174 from sipa/torhs (diff) | |
| download | discoin-415a87ef363396fe689ec452a30d36b1752eab2e.tar.xz discoin-415a87ef363396fe689ec452a30d36b1752eab2e.zip | |
Merge branch 'master' into async-ipv6-rpc
Diffstat (limited to 'src/key.cpp')
| -rw-r--r-- | src/key.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/key.cpp b/src/key.cpp index 57ab842bc..c943a38ea 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -129,6 +129,8 @@ void CKey::SetCompressedPubKey() void CKey::Reset() { fCompressedPubKey = false; + if (pkey != NULL) + EC_KEY_free(pkey); pkey = EC_KEY_new_by_curve_name(NID_secp256k1); if (pkey == NULL) throw key_error("CKey::CKey() : EC_KEY_new_by_curve_name failed"); @@ -137,6 +139,7 @@ void CKey::Reset() CKey::CKey() { + pkey = NULL; Reset(); } |