[Mesa-dev] [PATCH v2 1/4] gallium/winsys/kms: Fix double refcount when importing from prime FD (v2)
Tomasz Figa
tfiga at chromium.org
Tue Aug 2 10:46:25 UTC 2016
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 at chromium.org>
CC: <mesa-stable at lists.freedesktop.org>
---
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index 21ac0d7..0585fcc 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -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;
--
2.8.0.rc3.226.g39d4020
More information about the mesa-dev
mailing list