]> git.baikalelectronics.ru Git - kernel.git/commit
drm/gma500: fix double free of gma_connector
authorTom Rix <trix@redhat.com>
Sat, 3 Oct 2020 19:39:28 +0000 (12:39 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 Oct 2020 13:52:37 +0000 (15:52 +0200)
commit7078d7174619475ca3c9da51722ff893f861817a
tree814f4a73fe0a1f72619076cd2b76c91d2c95c910
parent8452a5cf469fd6d932ff068631410cbffa5100e8
drm/gma500: fix double free of gma_connector

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: a1ebc71ef9f2 ("gma500/cdv: Add eDP support")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201003193928.18869-1-trix@redhat.com
drivers/gpu/drm/gma500/cdv_intel_dp.c