mirror_ubuntu-kernels/drivers/gpu/drm/amd/display
Colin Ian King 2f2c3b36fc drm/amd/display: fix memory leaks on error exit return
Currently in the case where some of the allocations fail for dce110_tgv,
dce110_xfmv, dce110_miv or dce110_oppv then the exit return path ends
up leaking allocated objects. Fix this by kfree'ing them before returning.
Also re-work the comparison of the null pointers to use the !ptr idiom.

Detected by CoverityScan, CID#1460246, 1460325, 1460324, 1460392
("Resource Leak")

Fixes: c4562236b3bc ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-28 17:55:40 -05:00
..
amdgpu_dm drm/amd/display: Do DC mode-change check when adding CRTCs 2017-11-28 17:55:26 -05:00
dc drm/amd/display: fix memory leaks on error exit return 2017-11-28 17:55:40 -05:00
include drm/amd/display: add performance trace macro to dc 2017-10-21 16:50:00 -04:00
modules drm/amd/display: Use kernel alloc/free 2017-09-28 16:46:15 -04:00
Kconfig drm/amd/display: make FBC configurable option 2017-10-21 16:46:05 -04:00
Makefile
TODO drm/amd/display: DC I2C review 2017-09-28 16:47:09 -04:00