[ovs-dev] [PATCH v2] netflow: Fix memory leak in netflow_unref.

Ben Pfaff blp at ovn.org
Wed May 31 18:55:43 UTC 2017


On Wed, May 31, 2017 at 11:16:10AM -0700, Joe Stringer wrote:
> On 30 May 2017 at 09:47, Ben Pfaff <blp at ovn.org> wrote:
> > On Thu, May 25, 2017 at 01:47:32PM -0700, Joe Stringer wrote:
> >> On 21 May 2017 at 21:55, Yunjian Wang <wangyunjian at huawei.com> wrote:
> >> > The memory leak was triggered each time on calling netflow_unref() with
> >> > containing netflow_flows. And flows need to be removed and destroyed.
> >> >
> >> > Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
> >> > ---
> >>
> >> Does this also need to netflow_expire__() the flows? Would it make
> >> sense for this flow clear path to share code with
> >> netflow_flow_clear()?
> >
> > That would certainly make sense.  However, it adds a lot of extra code
> > to run at the time we're freeing something, which is always a little
> > risky.  Since Greg is having trouble testing this at all, I lean toward
> > just freeing without trying to send out NetFlow expirations.
> 
> This seems fine to me. It looks like the biggest issue is the bug
> that's fixed by the patch, which seems correct to me so I'd be happy
> if this was applied as-is.

I think that's what I'm going to do.


More information about the dev mailing list