- After having been compared to NULL value, pointer 'start' is dereferenced.
- Redundant comparison '(0 != forward)' is always 'true'.
- Use after free (USE_AFTER_FREE) - this->v.
Change-Id: I1860c13ac77311f249688294f90efcb3f1d4868a
{
auto deputy = DeputyOfProxyInParentGet( node );
next_related_in_direction =
- GetObjectInRelation( deputy, forward ? RelationType::FLOWS_TO : RelationType::FLOWS_FROM );
+ GetObjectInRelation( deputy, RelationType::FLOWS_TO );
}
- if( next_related_in_direction && start->GetStates()[State::DEFUNCT] )
+ if( next_related_in_direction && start && start->GetStates()[State::DEFUNCT] )
+ {
next_related_in_direction = NULL;
+ }
+
unsigned char want_cycle_detection = 0;
if( next_related_in_direction )
{
destructors.push_back([=]()
{
DBUS_DEBUG( "unregistering interface %p", v );
+ {
+ std::lock_guard< std::mutex > lock( globalEntriesMutex );
+ globalEntries.erase( v );
+ }
eldbus_service_interface_unregister( v );
- std::lock_guard< std::mutex > lock( globalEntriesMutex );
- globalEntries.erase( v );
}
);
}