crypto: do not deallocate embedded buffer
authorFedor Indutny <fedor.indutny@gmail.com>
Thu, 13 Jun 2013 10:59:29 +0000 (12:59 +0200)
committerFedor Indutny <fedor.indutny@gmail.com>
Fri, 14 Jun 2013 15:10:04 +0000 (17:10 +0200)
src/node_crypto_bio.cc

index 389d281..9d566fd 100644 (file)
@@ -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_);