mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 11:10:10 +01:00
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 0aa6a818ef)
This commit is contained in:
parent
61a6d84679
commit
ab157ffd86
1 changed files with 0 additions and 1 deletions
|
|
@ -276,7 +276,6 @@ kms_sw_displaytarget_from_handle(struct sw_winsys *ws,
|
|||
case DRM_API_HANDLE_TYPE_FD:
|
||||
kms_sw_dt = kms_sw_displaytarget_add_from_prime(kms_sw, whandle->handle);
|
||||
if (kms_sw_dt) {
|
||||
kms_sw_dt->ref_count++;
|
||||
kms_sw_dt->width = templ->width0;
|
||||
kms_sw_dt->height = templ->height0;
|
||||
kms_sw_dt->stride = whandle->stride;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue