[ovs-dev] [nxm 01/42] ofproto: Fix memory leak in handle_packet_out().
Justin Pettit
jpettit at nicira.com
Thu Oct 28 13:38:52 PDT 2010
Looks good.
--Justin
On Oct 28, 2010, at 10:27 AM, Ben Pfaff wrote:
> ---
> ofproto/ofproto.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index f44d8a2..cab75e6 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -2947,14 +2947,12 @@ handle_packet_out(struct ofproto *p, struct ofconn *ofconn,
> flow_extract(&payload, 0, ofp_port_to_odp_port(ntohs(opo->in_port)), &flow);
> error = xlate_actions((const union ofp_action *) opo->actions, n_actions,
> &flow, p, &payload, &actions, NULL, NULL, NULL);
> - if (error) {
> - return error;
> + if (!error) {
> + dpif_execute(p->dpif, actions.actions, actions.n_actions, &payload);
> }
> -
> - dpif_execute(p->dpif, actions.actions, actions.n_actions, &payload);
> ofpbuf_delete(buffer);
>
> - return 0;
> + return error;
> }
>
> static void
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list