# HG changeset patch # User Paul Boddie # Date 1619826393 -7200 # Node ID 8968c31239cb706f317c571fb7d037346beebe20 # Parent 126394a73109ace5247c32f59d48bdda3f408c26 Fixed region allocation when no more regions are available. diff -r 126394a73109 -r 8968c31239cb libmem/lib/src/memory_preallocated.cc --- a/libmem/lib/src/memory_preallocated.cc Sat Apr 24 23:15:21 2021 +0200 +++ b/libmem/lib/src/memory_preallocated.cc Sat May 01 01:46:33 2021 +0200 @@ -62,6 +62,9 @@ { std::lock_guard guard(_lock); + if (_regions.empty()) + return NULL; + Region *region = _regions.front(); _regions.pop_front();