]> Git Repo - linux.git/commit
firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup()
authorSu Hui <[email protected]>
Fri, 11 Oct 2024 10:40:02 +0000 (18:40 +0800)
committerSudeep Holla <[email protected]>
Fri, 11 Oct 2024 15:52:42 +0000 (16:52 +0100)
commit39b13dce1a91cdfc3bec9238f9e89094551bd428
treef484bbc7f7fa872dec38d96bef0adddf0d93088c
parent9852d85ec9d492ebef56dc5f229416c925758edc
firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup()

Clang static checker(scan-build) throws below warning:
  |  drivers/firmware/arm_scmi/driver.c:line 2915, column 2
  |        Attempt to free released memory.

When devm_add_action_or_reset() fails, scmi_debugfs_common_cleanup()
will run twice which causes double free of 'dbg->name'.

Remove the redundant scmi_debugfs_common_cleanup() to fix this problem.

Fixes: c3d4aed763ce ("firmware: arm_scmi: Populate a common SCMI debugfs root")
Signed-off-by: Su Hui <[email protected]>
Reviewed-by: Cristian Marussi <[email protected]>
Message-Id: <20241011104001.1546476[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
drivers/firmware/arm_scmi/driver.c
This page took 0.060989 seconds and 4 git commands to generate.