[Mesa-dev] [PATCH] st/xa: Fix a memory leak

Thomas Hellstrom thellstrom at vmware.com
Wed Nov 28 08:13:00 UTC 2018


Free the context after destruction.

Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Reviewed-by: Sinclair Yeh <syeh at vmware.com>
---
 src/gallium/state_trackers/xa/xa_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c
index 94f7185272a..a4630cf09ca 100644
--- a/src/gallium/state_trackers/xa/xa_context.c
+++ b/src/gallium/state_trackers/xa/xa_context.c
@@ -91,6 +91,7 @@ xa_context_destroy(struct xa_context *r)
     }
 
     r->pipe->destroy(r->pipe);
+    free(r);
 }
 
 XA_EXPORT int
-- 
2.19.0.rc1



More information about the mesa-dev mailing list