From: Kirill Burtsev Date: Wed, 5 Dec 2018 15:54:27 +0000 (+0000) Subject: loader: free error state, when checking the drawable type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a539316485ddda074ca1b71aebf4a29b65af87c3;p=mesa.git loader: free error state, when checking the drawable type 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 Cc: Boyan Ding Fixes: 6bd9ba7d074 ("loader: Add dri3 helper") Reviewed-by: Emil Velikov [Emil: add commit message, fixes tag] Signed-off-by: Emil Velikov --- 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;