[ovs-dev] [branch 2.12] ovn-northd: fix memory leak in add_distributed_nat_routes() function

Justin Pettit jpettit at ovn.org
Thu Aug 8 17:09:15 UTC 2019


Thanks.  I added a reference to the OVN repo commit and merged this into branch-2.12.

--Justin


> On Aug 8, 2019, at 1:25 AM, Damijan Skvarc <damjan.skvarc at gmail.com> wrote:
> 
> Within this function actions & match dynamic strings are used as helper
> variables for adding entries into logical flow table. Variables are
> used several times in order to optimize number of memory allocations,
> however at the end memory was forgotten to be deallocated.
> 
> Signed-off-by: Damijan Skvarc <damjan.skvarc at gmail.com>
> ---
> ovn/northd/ovn-northd.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index ae09cf3..95b9570 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -5717,6 +5717,8 @@ add_distributed_nat_routes(struct hmap *lflows, const struct ovn_port *op)
>             ds_clear(&actions);
>         }
>     }
> +    ds_destroy(&match);
> +    ds_destroy(&actions);
> }
> 
> static void
> -- 
> 2.7.4
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list