sim: Fix resource leak in BaseGlobalEvent
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>
Tue, 9 Sep 2014 08:36:32 +0000 (04:36 -0400)
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>
Tue, 9 Sep 2014 08:36:32 +0000 (04:36 -0400)
commit11494c4345e0de2b51dddcc936cedade76f8a90e
treea09f4fbe426871acea19d5171531f682dd06254a
parentda4539dc749c3d29c03de9b3130f1c9a7266be9d
sim: Fix resource leak in BaseGlobalEvent

Static analysis revealed that BaseGlobalEvent::barrier was never
deallocated. This changeset solves this leak by making the barrier
allocation a part of the BaseGlobalEvent instead of storing a pointer
to a separate heap-allocated barrier.
src/sim/global_event.cc
src/sim/global_event.hh