]> git.tdb.fi Git - r2c2.git/commit
Avoid segfault if an exception is thrown while loading
authorMikko Rasa <tdb@tdb.fi>
Wed, 7 May 2014 20:26:13 +0000 (23:26 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 8 May 2014 15:27:03 +0000 (18:27 +0300)
commit02c12263ac40289afc626156358ebb705ed84a5b
tree78aa1c400d1ab4938612703ede5ce43814f980e1
parent78d36019ec11d62d6fd016fcbe19f566d11771ff
Avoid segfault if an exception is thrown while loading

The Layout::add functions are called from object constructors.  If an
exception is thrown inside them, the constructor will abort and the
object will be deleted.  If that happens, it must be removed from the
Layout as well, or an invalid memory access will occur later.
source/libr2c2/layout.cpp