Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2022 07:56:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 265146] bhnd: fix potential resource leak in bhnd_pmu_core_attach()
Message-ID:  <bug-265146-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 265146
           Summary: bhnd: fix potential resource leak in
                    bhnd_pmu_core_attach()
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: niejianglei2021@163.com

bhnd_pmu_core_attach() allocates resource with bhnd_alloc_resource_any()
and bhnd_alloc_pmu(). When some error occurs in this funciton, some
relevant resource is not released, which will lead to a resource leak.

We should release the relevant relevant with bhnd_release_resource() and
bhnd_release_pmu() on the error path to avoid the resource leak.

--=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-265146-227>