diff options
| author | 2026-03-23 00:04:08 +0800 | |
|---|---|---|
| committer | 2026-03-24 15:51:50 +0100 | |
| commit | 5c709b376460ff322580c41600e31c02f7cc0307 (patch) | |
| tree | 8915c223c0dcd9e868fc6bda20ee3ada2a7b360d /samples/kobject/ssh:/git@git.zx2c4.com | |
| parent | EDAC/versalnet: Fix memory leak in remove and probe error paths (diff) | |
EDAC/versalnet: Fix device_node leak in mc_probe()
of_parse_phandle() returns a device_node reference that must be released with
of_node_put(). The original code never freed r5_core_node on any exit path,
causing a memory leak.
Fix this by using the automatic cleanup attribute __free(device_node) which
ensures of_node_put() is called when the variable goes out of scope.
Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Cc: <stable@kernel.org>
Link: https://patch.msgid.link/20260323-versalnet-v1-1-4ab3012635ef@gmail.com
Diffstat (limited to 'samples/kobject/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
