Skip to content
Commit ebc77bcc authored by Zhou Qingyang's avatar Zhou Qingyang Committed by Alex Deucher
Browse files

drm/amd/display/dc/calcs/dce_calcs: Fix a memleak in calculate_bandwidth()



In calculate_bandwidth(), the tag free_sclk and free_yclk are reversed,
which could lead to a memory leak of yclk.

Fix this bug by changing the location of free_sclk and free_yclk.

This bug was found by a static analyzer.

Builds with 'make allyesconfig' show no new warnings,
and our static analyzer no longer warns about this code.

Fixes: 2be8989d ("drm/amd/display/dc/calcs/dce_calcs: Move some large variables from the stack to the heap")
Signed-off-by: default avatarZhou Qingyang <zhou1615@umn.edu>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 98fdcacb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment