crypto: fix DH use-after-free and memory leak
authorBen Noordhuis <info@bnoordhuis.nl>
Sun, 21 Oct 2012 22:18:14 +0000 (00:18 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Sun, 21 Oct 2012 22:20:45 +0000 (00:20 +0200)
commit844a0058d0c6815308a0e68192df6a1d6213c68e
treed2e66c3eaa005d4d9fa64502ee13ac1bb1c232ae
parentde18e29784b5f10f695d0859b43c81f41d743e85
crypto: fix DH use-after-free and memory leak

Fix a use-after-free bug and a memory leak in the error path of
DiffieHellman::ComputeSecret().

* the BIGNUM key was used after being freed with BN_free().
* the output buffer was not freed
src/node_crypto.cc