On Mon, Nov 28, 2011 at 10:23:07PM +0200, Jaakko Heinonen wrote:
J> On 2011-11-28, Bjoern A. Zeeb wrote:
J> > > static void
J> > > if_clone_free(struct if_clone *ifc)
J> > > {
J> > > - for (int bytoff = 0; bytoff < ifc->ifc_bmlen; bytoff++) {
J> > > - KASSERT(ifc->ifc_units[bytoff] == 0x00,
J> > > - ("ifc_units[%d] is not empty", bytoff));
J> > > - }
J> > >
J> > > KASSERT(LIST_EMPTY(&ifc->ifc_iflist),
J> > > ("%s: ifc_iflist not empty", __func__));
J> > >
J> > > IF_CLONE_LOCK_DESTROY(ifc);
J> > > - free(ifc->ifc_units, M_CLONE);
J> > > + delete_unrhdr(ifc->ifc_unrhdr);
J> > > }
J>
J> delete_unrhdr() KASSERTs that all allocations has been freed. Thus if
J> the leak below has occurred, the result will be a panic at this point
J> with INVARIANTS enabled kernel. If INVARIANTS is disabled, a memory leak
J> is possible.
Thanks, Jaakko! Good catch. I will try to fix that.
--
Totus tuus, Glebius.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"