Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix memory leak in execute_controller_action.
> On Sep 20, 2016, at 8:35 AM, Ryan Moats wrote:
>
> commit df70a7731 ("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.
>
> This issue is only seen in the master branch.
>
Thanks for the fix. I missed the fact that while the packet data is
unconditionally taken away from the ‘packet’, the struct dp_packet itself still
needs to be freed.
Jarno
> Fixes: df70a7731 ("ofproto-dpif-xlate: Allow translating without
> side-effects.")
> Signed-off-by: Ryan Moats
> ---
> ofproto/ofproto-dpif-xlate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index f17cb79..71ffca0 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -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
> --
> 2.7.0
>
> ___
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix memory leak in execute_controller_action.
On Tue, Sep 20, 2016 at 10:35:46AM -0500, Ryan Moats wrote:
> commit df70a7731 ("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.
>
> This issue is only seen in the master branch.
>
> Fixes: df70a7731 ("ofproto-dpif-xlate: Allow translating without
> side-effects.")
> Signed-off-by: Ryan Moats
Thanks, applied to master.
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix memory leak in execute_controller_action.
commit df70a7731 ("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.
This issue is only seen in the master branch.
Fixes: df70a7731 ("ofproto-dpif-xlate: Allow translating without side-effects.")
Signed-off-by: Ryan Moats
---
ofproto/ofproto-dpif-xlate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index f17cb79..71ffca0 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -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
--
2.7.0
___
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
