[ovs-dev] [PATCH] ovn-controller: Fix memory leak of keep_local_datapath_by_uuid.
Ryan Moats
rmoats at us.ibm.com
Fri Aug 19 16:00:51 UTC 2016
Ben Pfaff <blp at ovn.org> wrote on 08/19/2016 10:50:17 AM:
> From: Ben Pfaff <blp at ovn.org>
> To: dev at openvswitch.org
> Cc: Ben Pfaff <blp at ovn.org>, Ryan Moats/Omaha/IBM at IBMUS, Ramu
> Ramamurthy <ramu.ramamurthy at gmail.com>
> Date: 08/19/2016 10:50 AM
> Subject: [PATCH] ovn-controller: Fix memory leak of
> keep_local_datapath_by_uuid.
>
> Fixes: 263064aeaa31 ("Convert binding_run to incremental processing.")
> Reported-by: Ramu Ramamurthy <ramu.ramamurthy at gmail.com>
> CC: RYAN D. MOATS <rmoats at us.ibm.com>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
> ovn/controller/binding.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c
> index 5f03702..c26007d 100644
> --- a/ovn/controller/binding.c
> +++ b/ovn/controller/binding.c
> @@ -307,6 +307,12 @@ binding_run(struct controller_ctx *ctx, const
> struct ovsrec_bridge *br_int,
> remove_local_datapath(local_datapaths, old_ld);
> }
> }
> + struct local_datapath *ld;
> + HMAP_FOR_EACH_SAFE (ld, next, uuid_hmap_node,
> + &keep_local_datapath_by_uuid) {
> + hmap_remove(&keep_local_datapath_by_uuid, &ld->
uuid_hmap_node);
> + free(ld);
> + }
> hmap_destroy(&keep_local_datapath_by_uuid);
>
> /* Any remaining entries in removed_lports are logical ports
that
> --
> 2.1.3
>
Even though this is likely going away very soon --
Acked-by: Ryan Moats <rmoats at us.ibm.com>
More information about the dev
mailing list