diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-10-18 10:09:45 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 13:41:31 +0400 |
commit | 0c5d37033b3a16fdf6442730cee82dd3e8465fb1 (patch) | |
tree | 0eadc332097cb6dc987e93e7ce9a20f02cabfe0a /drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | |
parent | d2c184fb10656f2a6d59fef76efb3a8b12fb6ed4 (diff) | |
download | linux-0c5d37033b3a16fdf6442730cee82dd3e8465fb1.tar.xz |
vmwgfx: memory leaks caused by double allocation
These variables get allocated twice so the first allocation is a
memory leak.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index c7cff3debe11..86c5e4cceb31 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -1255,8 +1255,7 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct vmw_private *dev_priv = vmw_priv(dev); - struct vmw_user_surface *user_srf = - kmalloc(sizeof(*user_srf), GFP_KERNEL); + struct vmw_user_surface *user_srf; struct vmw_surface *srf; struct vmw_resource *res; struct vmw_resource *tmp; |