[ovs-dev] [PATCH] ovn-controller: Fix memory leak of keep_local_datapath_by_uuid.
Ben Pfaff
blp at ovn.org
Fri Aug 19 16:21:22 UTC 2016
On Fri, Aug 19, 2016 at 11:00:51AM -0500, Ryan Moats wrote:
> 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>
Thanks, applied to master and branch-2.6.
More information about the dev
mailing list