drm/amd: fix potential memory leak
This patch fix potential memory leak (clk_src) when function run into last return NULL. Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6160216fd2
commit
d200a64305
@ -1643,6 +1643,7 @@ static struct clock_source *dcn31_clock_source_create(
|
||||
}
|
||||
|
||||
BREAK_TO_DEBUGGER();
|
||||
kfree(clk_src);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user