i965: free object labels when deleting
authorSergii Romantsov <sergii.romantsov@globallogic.com>
Wed, 17 Jul 2019 15:59:28 +0000 (18:59 +0300)
committerSergii Romantsov <sergii.romantsov@globallogic.com>
Mon, 22 Jul 2019 09:39:32 +0000 (12:39 +0300)
Some leaks detected with GL_KHR_debug on i965.

CC: Timothy Arceri <t_arceri@yahoo.com.au>
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/mesa/drivers/dri/i965/brw_queryobj.c
src/mesa/drivers/dri/i965/brw_sync.c
src/mesa/drivers/dri/i965/gen6_sol.c

index 1fb809cab8f19c871a45842d6d7c9c4f2f67f5a5..c6bd57130deebeed9e57500e2bbb5315fef99dc7 100644 (file)
@@ -239,6 +239,7 @@ brw_delete_query(struct gl_context *ctx, struct gl_query_object *q)
    struct brw_query_object *query = (struct brw_query_object *)q;
 
    brw_bo_unreference(query->bo);
+   free(query->Base.Label);
    free(query);
 }
 
index 639164887913e6956ba1cc1c95188c16354150c1..d5e2d079380aa5cfda651f634597935300bfc943 100644 (file)
@@ -354,6 +354,7 @@ brw_gl_delete_sync(struct gl_context *ctx, struct gl_sync_object *_sync)
    struct brw_gl_sync *sync = (struct brw_gl_sync *) _sync;
 
    brw_fence_finish(&sync->fence);
+   free(sync->gl.Label);
    free(sync);
 }
 
index a2d2606a35d4b41b1b3b0979bb48f2a85ee9aa2f..1d5f26ab0c0d4569485ca0fb0a32f4f9543f20f7 100644 (file)
@@ -218,6 +218,7 @@ brw_delete_transform_feedback(struct gl_context *ctx,
    brw_bo_unreference(brw_obj->offset_bo);
    brw_bo_unreference(brw_obj->prim_count_bo);
 
+   free(obj->Label);
    free(brw_obj);
 }