diff options
author | Nikhil Mahale <nmahale@nvidia.com> | 2017-08-09 09:23:01 +0530 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-08-14 15:30:33 +0200 |
commit | 491ab4700d1b64f5cf2f9055e01613a923df5fab (patch) | |
tree | f88ffa570a5f2bcc05c5557e08d250851514c889 /drivers/gpu/drm/drm_plane.c | |
parent | 0fa375e6bc9023211eead30a6a79963c45a563da (diff) | |
download | linux-491ab4700d1b64f5cf2f9055e01613a923df5fab.tar.gz linux-491ab4700d1b64f5cf2f9055e01613a923df5fab.tar.bz2 linux-491ab4700d1b64f5cf2f9055e01613a923df5fab.zip |
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
Diffstat (limited to 'drivers/gpu/drm/drm_plane.c')
-rw-r--r-- | drivers/gpu/drm/drm_plane.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 5dc8c4350602..e40c12fabbde 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; |