Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18a4a903 authored by Tom Rix's avatar Tom Rix Committed by Greg Kroah-Hartman
Browse files

drm/gma500: fix double free of gma_connector



[ Upstream commit 4e19d51ca5b28a1d435a844c7b2a8e1b1b6fa237 ]

clang static analysis reports this problem:

cdv_intel_dp.c:2101:2: warning: Attempt to free released memory
        kfree(gma_connector);
        ^~~~~~~~~~~~~~~~~~~~

In cdv_intel_dp_init() when the call to cdv_intel_edp_panel_vdd_off()
fails, the handler calls cdv_intel_dp_destroy(connector) which does
the first free of gma_connector. So adjust the goto label and skip
the second free.

Fixes: d112a816 ("gma500/cdv: Add eDP support")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201003193928.18869-1-trix@redhat.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7c1abeea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment