Skip to content

Fix possible double-free of flow table entry#788

Open
PlagueCZ wants to merge 1 commit into
mainfrom
fix/dp_delete_flow_ret
Open

Fix possible double-free of flow table entry#788
PlagueCZ wants to merge 1 commit into
mainfrom
fix/dp_delete_flow_ret

Conversation

@PlagueCZ

Copy link
Copy Markdown
Contributor

If flow table insertion fails, the rollback code has a bug. Due to the nature of dp_delete_flow() which calls dp_ref_dec(), the flow value would already be freed by the reference counter hitting zero.

But dp_delete_flow() can actually fail, so the result needs to be passed to the caller to decide if rte_val still remains to be freed or not.

Connected to issue #784

@PlagueCZ PlagueCZ requested a review from a team as a code owner June 21, 2026 20:39
@github-actions github-actions Bot added bug Something isn't working size/M labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/M

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant