odp-execute: Fix memory leak on recirc action
authorDaniele Di Proietto <ddiproietto@vmware.com>
Fri, 3 Oct 2014 22:04:15 +0000 (15:04 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Fri, 3 Oct 2014 22:04:15 +0000 (15:04 -0700)
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 <ddiproietto@vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
lib/odp-execute.c

index 78b1f24..a5fad19 100644 (file)
@@ -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;