From: Timothy Arceri Date: Mon, 26 Aug 2013 07:16:08 +0000 (+1000) Subject: mesa: free object labels when deleting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d8dd59cf53d2f47b817d79204a52bb3a46e8c77;p=mesa.git mesa: free object labels when deleting Signed-off-by: Timothy Arceri Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 006a2eaa051..5d50d29f8f6 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 bd71688e826..b22340ff3fd 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 a82436c3565..595641915e7 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 4ec4118c5b7..2fad4588066 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 60356b85d35..6b636f4cb3b 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 d2bde803f1a..2ff96e548eb 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 3857eda0651..39cfcd086cf 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 a62ad0413cf..0d794ad9693 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 c8d25cdf13b..e4264741ae0 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 7c8f04db966..cc2c786bb24 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 03f18830050..3f8a7f48dad 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 2e5e253a41f..25cc61aefd0 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 94bf4861da9..6d875b851a2 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); }