[Mesa-dev] [PATCH 5/5] i965: use _mesa_delete_buffer_object

Nicolai Hähnle nhaehnle at gmail.com
Tue Jan 5 18:53:40 PST 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

This is more future-proof, plugs the memory leak of Label and properly
destroys the buffer mutex.
---
 src/mesa/drivers/dri/i965/intel_buffer_objects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index b26c939..ce6b358 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -167,7 +167,7 @@ brw_delete_buffer(struct gl_context * ctx, struct gl_buffer_object *obj)
    _mesa_buffer_unmap_all_mappings(ctx, obj);
 
    drm_intel_bo_unreference(intel_obj->buffer);
-   free(intel_obj);
+   _mesa_delete_buffer_object(ctx, obj);
 }
 
 
-- 
2.5.0



More information about the mesa-dev mailing list