From 4536b27ac1b71e92b26c5d4ba772ae8511db09eb Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 13 Jun 2013 12:59:29 +0200 Subject: [PATCH] crypto: do not deallocate embedded buffer --- src/node_crypto_bio.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index 389d281..9d566fd 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -226,6 +226,11 @@ void NodeBIO::FreeEmpty() { return; while (cur != read_head_) { + // Skip embedded buffer + if (cur == &head_) { + cur = head_.next_; + continue; + } assert(cur != write_head_); assert(cur->write_pos_ == cur->read_pos_); -- 2.7.4