diff options
author | lloyd <[email protected]> | 2010-03-10 15:28:54 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-10 15:28:54 +0000 |
commit | 5cb9483a790fcb81676be9d287178b3040667d20 (patch) | |
tree | e688f41896b4a398d736ecfa7cd56b5c1588b1e2 /checks/nist_tests | |
parent | e34b9693d203dcb17e396ba58c00489c7d02a98c (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