Skip to content

Commit 099f0af

Browse files
jnikulasuperna9999
authored andcommitted
drm/meson: fix memory leak on ->hpd_notify callback
The EDID returned by drm_bridge_get_edid() needs to be freed. Fixes: 0af5e0b ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR") Cc: Neil Armstrong <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Martin Blumenstingl <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Jerome Brunet <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] # v5.17+ Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e2ee60a commit 099f0af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/meson/meson_encoder_hdmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,
334334
return;
335335

336336
cec_notifier_set_phys_addr_from_edid(encoder_hdmi->cec_notifier, edid);
337+
338+
kfree(edid);
337339
} else
338340
cec_notifier_phys_addr_invalidate(encoder_hdmi->cec_notifier);
339341
}

0 commit comments

Comments
 (0)