[Mesa-dev] [PATCH 08/15] mesa: free object labels when deleting
Timothy Arceri
t_arceri at yahoo.com.au
Mon Aug 26 03:43:50 PDT 2013
Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
src/mesa/main/arrayobj.c | 1 +
src/mesa/main/bufferobj.c | 1 +
src/mesa/main/dlist.c | 1 +
src/mesa/main/framebuffer.c | 1 +
src/mesa/main/queryobj.c | 1 +
src/mesa/main/renderbuffer.c | 1 +
src/mesa/main/samplerobj.c | 1 +
src/mesa/main/shaderobj.c | 3 +++
src/mesa/main/syncobj.c | 1 +
src/mesa/main/texobj.c | 2 ++
src/mesa/main/transformfeedback.c | 1 +
src/mesa/state_tracker/st_cb_bufferobjects.c | 1 +
src/mesa/state_tracker/st_cb_syncobj.c | 1 +
13 files changed, 16 insertions(+)
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 006a2ea..5d50d29 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -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);
}
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index bd71688..b22340f 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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);
}
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index a82436c..5956419 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -769,6 +769,7 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
}
}
+ free(dlist->Label);
free(dlist);
}
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 4ec4118..2fad458 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -195,6 +195,7 @@ _mesa_destroy_framebuffer(struct gl_framebuffer *fb)
{
if (fb) {
_mesa_free_framebuffer_data(fb);
+ free(fb->Label);
free(fb);
}
}
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 60356b8..6b636f4 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -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);
}
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index d2bde80..2ff96e5 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -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);
}
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 3857eda..39cfcd0 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -155,6 +155,7 @@ static void
_mesa_delete_sampler_object(struct gl_context *ctx,
struct gl_sampler_object *sampObj)
{
+ free(sampObj->Label);
free(sampObj);
}
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index a62ad04..0d794ad 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -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);
}
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index c8d25cd..e426474 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -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);
}
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7c8f04d..cc2c786 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -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);
}
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 03f1883..3f8a7f4 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -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);
}
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 2e5e253..25cc61a 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -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);
}
diff --git a/src/mesa/state_tracker/st_cb_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c
index 94bf486..6d875b8 100644
--- a/src/mesa/state_tracker/st_cb_syncobj.c
+++ b/src/mesa/state_tracker/st_cb_syncobj.c
@@ -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);
}
--
1.7.9.5
More information about the mesa-dev
mailing list