@@ -561,10 +561,11 @@ Chunk *k = _chunk; // Get filled-up chunk address _chunk = new (alloc_failmode, len) Chunk(len); if (_chunk == NULL) { + _chunk = k; // restore the value of _chunk return NULL; } if (k) k->set_next(_chunk); // Append new chunk to end of linked list else _first = _chunk; _hwm = _chunk->bottom(); // Save the cached hwm, max