]> git.baikalelectronics.ru Git - kernel.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)
commited6444f790366cea22a0e50f9ad66530f0d24884
tree1d10c3a28fbae14552d062a189cc88f719a93f3c
parent30945d33c420da60c22ffb5eb7e25a2abe4a5c7a
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