Skip to content

Commit

Permalink
ofproto-dpif-xlate: Fix memory leak in execute_controller_action.
Browse files Browse the repository at this point in the history
commit df70a77 ("ofproto-dpif-xlate: Allow translating
without side-effects.") created a memory leak by removing the
dp_packet_delete statement in execute_controller_action that
freed the earlier cloned packet.  This commit restores this
statement to the end of the method.

Fixes: df70a77 ("ofproto-dpif-xlate: Allow translating without side-effects.")
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
jayhawk87 authored and blp committed Sep 20, 2016
1 parent 1388f0b commit 3b4fff4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ofproto/ofproto-dpif-xlate.c
Expand Up @@ -3648,6 +3648,8 @@ execute_controller_action(struct xlate_ctx *ctx, int len,
entry->controller.ofproto = ctx->xbridge->ofproto;
entry->controller.am = am;
}

dp_packet_delete(packet);
}

static void
Expand Down

0 comments on commit 3b4fff4

Please sign in to comment.