[Bug 270270] mii: memory leak when mii_attach() fails

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 17 Mar 2023 20:05:48 UTC

--- Comment #3 from Jiahao LI <jiahali@blackberry.com> ---
(In reply to Mina Galić from comment #2)
Thanks for the suggestions.

I agree that it would be better to clean up the softc in device_delete_child().
Since changing the device_delete_child() would have an impact on many devices
and the softc will be allocated if the "miibus" input parameter of mii_attach()
is null, I only change it in the mii_attach() for minimal impact of other
components. It would be better that Freebsd can re-investigate the memory
allocation issues using device_*() APIs.

You are receiving this mail because:
You are the assignee for the bug.