add comment explaining is_allocated.

This commit is contained in:
Christopher Jeffrey 2014-10-27 17:34:08 -07:00
parent f8fccb8eaf
commit 9d54277db1
1 changed files with 2 additions and 1 deletions

View File

@ -3438,7 +3438,8 @@ cblock_to_jsblock(const CBlock& cblock, CBlockIndex* cblock_index, Local<Object>
std::string strHex = HexStr(ssBlock.begin(), ssBlock.end());
jsblock->Set(NanNew<String>("hex"), NanNew<String>(strHex));
// Freed up elsewhere:
// Was it allocated in find_new_block_index(), or did it already exist?
// (race condition here)
if (is_allocated) {
delete cblock_index;
}