Skip to content

Commit

Permalink
odp-execute: Fix memory leak on recirc action
Browse files Browse the repository at this point in the history
If odp_execute_actions() has been called with 'steal' set to true and
OVS_ACTION_ATTR_RECIRC as last action, it should allow dp_execute_cb()
to steal the packet.

Signed-off-by: Daniele Di Proietto <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
ddiproietto authored and Jarno Rajahalme committed Oct 3, 2014
1 parent d73803c commit 0057762
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/odp-execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ odp_execute_actions__(void *dp, struct dpif_packet **packets, int cnt,
/* Allow 'dp_execute_action' to steal the packet data if we do
* not need it any more. */
bool may_steal = steal && (!more_actions
&& left <= NLA_ALIGN(a->nla_len)
&& type != OVS_ACTION_ATTR_RECIRC);
&& left <= NLA_ALIGN(a->nla_len));
dp_execute_action(dp, packets, cnt, md, a, may_steal);
}
break;
Expand Down

0 comments on commit 0057762

Please sign in to comment.