OSDN Git Service

gallium/winsys/kms: Fix double refcount when importing from prime FD (v2)
authorTomasz Figa <tfiga@chromium.org>
Tue, 2 Aug 2016 10:46:25 +0000 (19:46 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 1 Sep 2016 10:39:45 +0000 (11:39 +0100)
commitab157ffd86f976a005108b2d5e72e38b482cd261
treece9f0fb472f43a9a46538ec1c57972e1d327967d
parent61a6d84679f696ec787aefba43f77aadd8baac9f
gallium/winsys/kms: Fix double refcount when importing from prime FD (v2)

Currently the code creates a display target struct with refcount field
initialized to 1 and then the caller again increments it, leading to
a leaked reference. Let's remove the unnecessary increment.

v2: Split from one big patch into four fixing one thing at a time.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 0aa6a818ef60e01f304987fe07ac1370d68d38b1)
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c