From: Kirill Burtsev <kirill.burt...@qt.io>

Currently we distinguish if the drawable is a window or pixmap by
checking xcb_present_select_input throws an error or not.

Yet, we don't always free the error state returned by xcb.

Cc: Kirill Burtsev <kirill.burt...@qt.io>
Cc: Boyan Ding <boyan.j.d...@gmail.com>
Fixes: 6bd9ba7d074 ("loader: Add dri3 helper")
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
[Emil: add commit message, fixes tag]
Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
Kirill thanks for the patch. I've taken the liberty of doing some minor
polish, hope that's ok with you.

In general patches must land in master first before being considered
for stable. If our docs [1] are unclear please send us a patch to
improve them - the website lives in $mesa/docs

Emil

[1] https://www.mesa3d.org/submittingpatches.html#criteria
---
 src/loader/loader_dri3_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 1981b5f0515..7cd6b1e8ab6 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1509,6 +1509,7 @@ dri3_update_drawable(struct loader_dri3_drawable *draw)
             mtx_unlock(&draw->mtx);
             return false;
          }
+         free(error);
          draw->is_pixmap = true;
          xcb_unregister_for_special_event(draw->conn, draw->special_event);
          draw->special_event = NULL;
-- 
2.19.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to