[Mesa-dev] [PATCH] st/mesa: Fix inversed test in st_api_destroy_drawable

Michel Dänzer michel at daenzer.net
Thu Jul 27 02:14:21 UTC 2017


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes a drawable leak.

Fixes: bbc29393d3be ("st/mesa: create framebuffer iface hash table per
                      st manager")
Tested-by: Nick Sarnie <commendsarnex at gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 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 6447403fc6..97bf89fc65 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.13.3



More information about the mesa-dev mailing list