aboutsummaryrefslogtreecommitdiffstats
path: root/checks/nist_tests
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-10 15:28:54 +0000
committerlloyd <[email protected]>2010-03-10 15:28:54 +0000
commit5cb9483a790fcb81676be9d287178b3040667d20 (patch)
treee688f41896b4a398d736ecfa7cd56b5c1588b1e2 /checks/nist_tests
parente34b9693d203dcb17e396ba58c00489c7d02a98c (diff)
Guard call to the allocator in deallocate() by checking if the alloc
pointer was actually set. Otherwise, the following problem could occur if an allocator could not be found: init() will call Allocator::get, which throws an exception init() is called from the constructor of the subclasses (MemoryVector, etc) Since the constructor of MemoryRegion has already finished, its destructor will be called. ~MemoryRegion will call deallocate() deallocate() will then access a NULL pointer By guarding the call, the exception is propagated correctly.
Diffstat (limited to 'checks/nist_tests')
0 files changed, 0 insertions, 0 deletions