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. Around line 3800 your previous commit left a double assignment kr6->r.labelid = 0; kr6->r.labelid = new_labelid; which should be fixed.