Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2023 14:45:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 270270] mii: memory leak when mii_attach() fails
Message-ID:  <bug-270270-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270270

            Bug ID: 270270
           Summary: mii: memory leak when mii_attach() fails
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jiahali@blackberry.com

Created attachment 240901
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D240901&action=
=3Dedit
Fix of memory leak when mii_attach() fails

When the PHY attach fails, the allocated miibus->softc from mii_attach() ->
device_set_driver() is not free. There is a memory leak for the "bus-sc"
memory.

A proposed fix is attached.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270270-227>