mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 08:48:48 +00:00
drm: fix leak of cliprects in drm_rmdraw()
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
d1ed629f44
commit
786225eb2f
@ -76,11 +76,14 @@ int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
|||||||
{
|
{
|
||||||
struct drm_draw *draw = data;
|
struct drm_draw *draw = data;
|
||||||
unsigned long irqflags;
|
unsigned long irqflags;
|
||||||
|
struct drm_drawable_info *info;
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->drw_lock, irqflags);
|
spin_lock_irqsave(&dev->drw_lock, irqflags);
|
||||||
|
|
||||||
drm_free(drm_get_drawable_info(dev, draw->handle),
|
info = drm_get_drawable_info(dev, draw->handle);
|
||||||
sizeof(struct drm_drawable_info), DRM_MEM_BUFS);
|
drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect),
|
||||||
|
DRM_MEM_BUFS);
|
||||||
|
drm_free(info, sizeof(struct drm_drawable_info), DRM_MEM_BUFS);
|
||||||
|
|
||||||
idr_remove(&dev->drw_idr, draw->handle);
|
idr_remove(&dev->drw_idr, draw->handle);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user