diff options
author | Anson Jacob <Anson.Jacob@amd.com> | 2021-08-23 13:41:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-09-14 15:57:10 -0400 |
commit | 7b89bf83181363a84f86da787159ddbbef505b8c (patch) | |
tree | 60033bd32f7d5f5512e18247371b5c4e557ab7b4 /drivers/gpu/drm/amd/display/dc/irq/irq_service.c | |
parent | f22268ce0a3f4065cddfb62ac29845b2c07c1c5a (diff) | |
download | linux-7b89bf83181363a84f86da787159ddbbef505b8c.tar.gz linux-7b89bf83181363a84f86da787159ddbbef505b8c.tar.bz2 linux-7b89bf83181363a84f86da787159ddbbef505b8c.zip |
drm/amd/display: Fix multiple memory leaks reported by coverity
coccinelle patch used:
@@ expression enc1,vpg,afmt; @@
- if (!enc1 || !vpg || !afmt)
+ if (!enc1 || !vpg || !afmt) {
+ kfree(enc1);
+ kfree(vpg);
+ kfree(afmt);
return NULL;
+ }
Addresses-Coverity-ID: 1466017: ("Resource leaks")
Reviewed-by: Aurabindo Jayamohanan Pillai <Aurabindo.Pillai@amd.com>
Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/irq/irq_service.c')
0 files changed, 0 insertions, 0 deletions