Skip to content

Commit

Permalink
b2b_logic: make sure old entity peer is stored when bridged
Browse files Browse the repository at this point in the history
Prevents a crash when accessing NULL peer.
Many thanks to Norm Brandinger for reporting and providing valuable
information for troubleshooing and testing!
  • Loading branch information
razvancrainea committed Jan 21, 2025
1 parent eb38e44 commit cf8b3d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/b2b_logic/bridging.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,9 @@ static int bridging_start_new_ent(b2bl_tuple_t* tuple, b2bl_entity_id_t *old_ent
}

entity->no = 1;
entity->peer = old_entity;
if (!old_entity->peer)
old_entity->peer = entity;
tuple->bridge_entities[1] = entity;

return 0;
Expand Down

0 comments on commit cf8b3d5

Please sign in to comment.