Commit 6d8dd59c authored by Timothy Arceri's avatar Timothy Arceri Committed by Brian Paul

mesa: free object labels when deleting

Signed-off-by: Timothy Arceri's avatarTimothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent 278372b4
......@@ -115,6 +115,7 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
unbind_array_object_vbos(ctx, obj);
_mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
_glthread_DESTROY_MUTEX(obj->Mutex);
free(obj->Label);
free(obj);
}
......
......@@ -265,6 +265,7 @@ _mesa_delete_buffer_object(struct gl_context *ctx,
bufObj->Name = ~0;
_glthread_DESTROY_MUTEX(bufObj->Mutex);
free(bufObj->Label);
free(bufObj);
}
......
......@@ -769,6 +769,7 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
}
}
free(dlist->Label);
free(dlist);
}
......
......@@ -195,6 +195,7 @@ _mesa_destroy_framebuffer(struct gl_framebuffer *fb)
{
if (fb) {
_mesa_free_framebuffer_data(fb);
free(fb->Label);
free(fb);
}
}
......
......@@ -126,6 +126,7 @@ _mesa_check_query(struct gl_context *ctx, struct gl_query_object *q)
static void
_mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q)
{
free(q->Label);
free(q);
}
......
......@@ -84,6 +84,7 @@ void
_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
_glthread_DESTROY_MUTEX(rb->Mutex);
free(rb->Label);
free(rb);
}
......
......@@ -155,6 +155,7 @@ static void
_mesa_delete_sampler_object(struct gl_context *ctx,
struct gl_sampler_object *sampObj)
{
free(sampObj->Label);
free(sampObj);
}
......
......@@ -125,6 +125,7 @@ static void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
{
free((void *)sh->Source);
free(sh->Label);
_mesa_reference_program(ctx, &sh->Program, NULL);
ralloc_free(sh);
}
......@@ -351,6 +352,8 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
shProg->_LinkedShaders[sh] = NULL;
}
}
free(shProg->Label);
}
......
......@@ -83,6 +83,7 @@ static void
_mesa_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
(void) ctx;
free(syncObj->Label);
free(syncObj);
}
......
......@@ -238,6 +238,8 @@ _mesa_delete_texture_object(struct gl_context *ctx,
/* destroy the mutex -- it may have allocated memory (eg on bsd) */
_glthread_DESTROY_MUTEX(texObj->Mutex);
free(texObj->Label);
/* free this object */
free(texObj);
}
......
......@@ -195,6 +195,7 @@ delete_transform_feedback(struct gl_context *ctx,
_mesa_reference_buffer_object(ctx, &obj->Buffers[i], NULL);
}
free(obj->Label);
free(obj);
}
......
......@@ -81,6 +81,7 @@ st_bufferobj_free(struct gl_context *ctx, struct gl_buffer_object *obj)
if (st_obj->buffer)
pipe_resource_reference(&st_obj->buffer, NULL);
free(st_obj->Base.Label);
free(st_obj);
}
......
......@@ -60,6 +60,7 @@ static void st_delete_sync_object(struct gl_context *ctx,
struct st_sync_object *so = (struct st_sync_object*)obj;
screen->fence_reference(screen, &so->fence, NULL);
free(so->b.Label);
free(so);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment