mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
drm: Fix framebuffer leak
Do not leak framebuffer if client provided crtc id found invalid. Signed-off-by: Nikhil Mahale <nmahale@nvidia.com> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1502250781-5779-1-git-send-email-nmahale@nvidia.com
This commit is contained in:
parent
0fa375e6bc
commit
491ab4700d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user