Commit 39b13dc
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: c3d4aed ("firmware: arm_scmi: Populate a common SCMI debugfs root")
Signed-off-by: Su Hui <[email protected]>
Reviewed-by: Cristian Marussi <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>1 parent 9852d85 commit 39b13dc
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2976 | 2976 | | |
2977 | 2977 | | |
2978 | 2978 | | |
2979 | | - | |
2980 | | - | |
| 2979 | + | |
2981 | 2980 | | |
2982 | | - | |
2983 | 2981 | | |
2984 | 2982 | | |
2985 | 2983 | | |
| |||
0 commit comments