diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-11-22 11:47:35 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-28 17:55:40 -0500 |
commit | 2f2c3b36fc5a3dc9fd2cf22a2f368502a70eea5d (patch) | |
tree | 29e8f8f7a7341dc67c3d9a4c4f70f9b52ffb4c22 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 93984bbc70b3f321b8f6a3ec303e31b084e54230 (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions