[ovs-dev] [nxm 01/42] ofproto: Fix memory leak in handle_packet_out().
Ben Pfaff
blp at nicira.com
Thu Oct 28 10:27:32 PDT 2010
---
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
More information about the dev
mailing list