Skip to content
Commit 1bea5349 authored by Gaosheng Cui's avatar Gaosheng Cui Committed by Michal Simek
Browse files

driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event()



The kfree() should be called when memory fails to be allocated for
cb_data in xlnx_add_cb_for_notify_event(), otherwise there will be
a memory leak, so add kfree() to fix it.

Fixes: 05e5ba40 ("driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver")
Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Acked-by: default avatarMichal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20221129010146.1026685-1-cuigaosheng1@huawei.com


Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
parent 1b929c02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment