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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:08 +0000 (09:29 -0700)
commite0cf83cc3de0341d8cabbb23097ad85f5ce97a11
treed9593c52337501b22c2287b61718f35282c0799f
parent3d47c41f985273eaee48e8b1b72a41f5b126cd70
drm/qxl: Do not leak memory if qxl_release_list_add fails

commit 8451cc964c1d193b989c41a44e5e77109cc696f8 upstream.

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>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/qxl/qxl_ioctl.c