diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-10-17 11:48:44 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-10-23 07:42:26 +0400 |
commit | 786225eb2f4e55b5dda3cf8c62a145e824aae199 (patch) | |
tree | 1bd5ca08765c1d0dbbc5dd342736f177072486a3 /drivers/gpu | |
parent | d1ed629f44b3a4108d5c445971535f05f441fce7 (diff) | |
download | linux-786225eb2f4e55b5dda3cf8c62a145e824aae199.tar.xz |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_drawable.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c index 70b15d1b8f54..4a794d89942b 100644 --- a/drivers/gpu/drm/drm_drawable.c +++ b/drivers/gpu/drm/drm_drawable.c @@ -76,11 +76,14 @@ int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_draw *draw = data; unsigned long irqflags; + struct drm_drawable_info *info; spin_lock_irqsave(&dev->drw_lock, irqflags); - drm_free(drm_get_drawable_info(dev, draw->handle), - sizeof(struct drm_drawable_info), DRM_MEM_BUFS); + info = drm_get_drawable_info(dev, draw->handle); + 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); |