Missing call to ifmedia_removeall(&adapter->media); in ena_detach. ifmedia_add allocates memory. entry = malloc(sizeof(*entry), M_IFADDR, M_NOWAIT); ifmedia_removeall will free the entries.
Thanks for the report, will look into this
Fixed by https://cgit.freebsd.org/src/commit/?id=449496eb28daec8d5b852fa4be1e337c2957345c .
(In reply to Zhenlei Huang from comment #2) Can it be resolved now that its fixed?
(In reply to Osama Abboud from comment #3) Typically we mark bugs closed once they're merged to stable branches (if applicable). In this case, there's an MFC timeout on the commit, so we should wait until that's done.
MFCed now: https://cgit.FreeBSD.org/src/commit/?id=db775f50e94744cfedd1f15e3aa5152ab1fbdcde https://cgit.FreeBSD.org/src/commit/?id=7a39823d8e53788b2ee38d908a16d2c312c6afe9 Thanks!