On Tue, Jun 07, 2022 at 06:21:37PM +0200, Theo Buehler wrote:
> On Tue, Jun 07, 2022 at 05:49:53PM +0200, Claudio Jeker wrote:
> > The kroute code can leak rtlabel references in various conditions.
> > In the end we want to drop the reference before free().
> > So move the unref into kroute_remove() so it is done mostly in one place.
> > On top fix a few other places where kroutes are freed.  
> 
> The places you change look correct to me, so
> 
> ok tb.
> 
> I could not figure out why some of the unchecked kroute_insert() and
> kroute6_insert() don't have the same problem as those that you fix.

In those cases we leak even more :)
Also I noticed that the places I fixed are unreachable since
kroute_insert() can't fail for F_BGP_INSERTED routes (or to be more
precise !F_KERNEL routes).

I'm on a kroute rampage and this code is not up to speed in many regards.
I hope most of those strange differences can be fixed.
 
> Around line 3800 your previous commit left a double assignment
> 
>                                               kr6->r.labelid = 0;
>                                               kr6->r.labelid = new_labelid;
> 
> which should be fixed.

I think I did this but I double check before commit. 

-- 
:wq Claudio

Reply via email to