crypto: don't mix new[] and free()
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 16 Aug 2013 14:36:21 +0000 (16:36 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 16 Aug 2013 14:47:08 +0000 (16:47 +0200)
commit9475ee41ad302d05c641b99cebef3e3f70b6c18f
treec5329b03922b14c170a45d8193c7c0dac39bbd02
parentf73ee94d4f595c2b2025e1133bc9f20a16f50ae9
crypto: don't mix new[] and free()

RandomBytes() allocated memory with new[] which was then handed off to
Buffer::Use() which eventually releases it again with free().

Mixing the two is technically a violation of the spec and besides, it's
generally frowned upon.
src/node_crypto.cc