drm/qxl: Do not leak memory if qxl_release_list_add fails
authorFrediano Ziglio <fziglio@redhat.com>
Wed, 3 Jun 2015 11:09:10 +0000 (12:09 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Jun 2015 01:00:37 +0000 (11:00 +1000)
commit8451cc964c1d193b989c41a44e5e77109cc696f8
treebb140e729ab0e97057d4c4f430cf563eee47df6f
parent2fa19535ca6abcbfd1ccc9ef694db52f49f77747
drm/qxl: Do not leak memory if qxl_release_list_add fails

If the function fails reference counter to the object is not decremented
causing leaks.
This is hard to spot as it happens only on very low memory situations.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/qxl/qxl_ioctl.c