[PATCH] drm: Fix framebuffer leak
Nikhil Mahale
nmahale at nvidia.com
Wed Aug 9 03:53:01 UTC 2017
Do not leak framebuffer if client provided crtc id found invalid.
Signed-off-by: Nikhil Mahale <nmahale at nvidia.com>
---
drivers/gpu/drm/drm_plane.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 5dc8c43..e40c12f 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -601,6 +601,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
crtc = drm_crtc_find(dev, plane_req->crtc_id);
if (!crtc) {
+ drm_framebuffer_put(fb);
DRM_DEBUG_KMS("Unknown crtc ID %d\n",
plane_req->crtc_id);
return -ENOENT;
--
2.6.6
More information about the dri-devel
mailing list