]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amd/display: Fix memory leak reported by coverity
authorAnson Jacob <Anson.Jacob@amd.com>
Fri, 13 Aug 2021 21:11:51 +0000 (17:11 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Aug 2021 18:19:00 +0000 (14:19 -0400)
commit03388a347fe7cf7c3bdf68b0823ba316d177d470
tree1d10c3a28fbae14552d062a189cc88f719a93f3c
parentf5d8e16488056d9ad48d2561ef4eaf7fdd11c162
drm/amd/display: Fix memory leak reported by coverity

Free memory allocated if any of the previous allocations failed.

>>>     CID 1487129:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "vpg" going out of scope leaks the storage it points to.

Addresses-Coverity-ID: 1487129: ("Resource leaks")

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c