From 57132d126f2e129fc2959dcc2c0a8126389d07ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Thu, 27 Jul 2017 11:12:24 +0900 Subject: [PATCH] st/mesa: Fix inversed test in st_api_destroy_drawable Fixes a drawable leak. Fixes: bbc29393d3be ("st/mesa: create framebuffer iface hash table per st manager") Bugzilla: https://bugs.freedesktop.org/101930 Tested-by: Nick Sarnie Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 6447403fc66..97bf89fc655 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -583,7 +583,7 @@ static void st_api_destroy_drawable(struct st_api *stapi, struct st_framebuffer_iface *stfbi) { - if (stfbi) + if (!stfbi) return; st_framebuffer_iface_remove(stfbi->state_manager, stfbi); -- 2.30.2