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

Commit de115fac authored by Laurent Pinchart's avatar Laurent Pinchart
Browse files

drm: rcar-du: Fix framebuffer reference leak through plane state



Plane state duplication takes a reference to the framebuffer stored in
the state, but state destroy doesn't release it. This causes a reference
leak. Fix it.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
parent 343e0d2b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -316,6 +316,9 @@ rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane)
static void rcar_du_plane_atomic_destroy_state(struct drm_plane *plane,
					       struct drm_plane_state *state)
{
	if (state->fb)
		drm_framebuffer_unreference(state->fb);

	kfree(to_rcar_du_plane_state(state));
}