Skip to content

Comments

Fix memory leak in MessageDispatcher when outGate->deliver returns false#1091

Open
pablomadoery wants to merge 1 commit intoinet-framework:masterfrom
pablomadoery:fix-message-dispatcher-leak-pr
Open

Fix memory leak in MessageDispatcher when outGate->deliver returns false#1091
pablomadoery wants to merge 1 commit intoinet-framework:masterfrom
pablomadoery:fix-message-dispatcher-leak-pr

Conversation

@pablomadoery
Copy link

When a network interface goes down (e.g. in failure simulations), the local deliver() returns false. MessageDispatcher ignored this boolean return value, causing dropped packets to remain undeleted in memory. This commit deletes the packet correctly and calls take() prior to deletion to satisfy OMNeT++ object tracking conventions.

When a network interface goes down (e.g. in failure simulations), the local deliver() returns false. MessageDispatcher ignored this boolean return value, causing dropped packets to remain undeleted in memory. This commit deletes the packet correctly and calls take() prior to deletion to prevent object stealing warnings.
@ZoltanBojthe
Copy link
Contributor

This patch is difficult to review due to extensive code reformatting. Please remove the formatting changes and include only the functional changes. We aim to keep the entire codebase consistent with our existing style, which the formatting in this patch currently deviates from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants