From: Aaron Watry Date: Thu, 2 Jan 2014 17:18:09 +0000 (-0600) Subject: mesa/main: Free ctx->DrawIndirectBuffer during teardown X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=188383591d6d657b557a5407ee9b7b993f79c53b;p=mesa.git mesa/main: Free ctx->DrawIndirectBuffer during teardown ctx->DrawIndirectBuffer wasn't being free'd in _mesa_free_buffer_objects With this patch, "valgrind --leak-check=full glxgears" on evergreen (CEDAR) now shows: LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 70,228 bytes in 651 blocks suppressed: 0 bytes in 0 blocks Reviewed-by: Brian Paul Reviewed-by: Marek Olšák Reviewed-by: Chris Forbes --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index a3d8f24b149..93367590aac 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -871,6 +871,8 @@ _mesa_free_buffer_objects( struct gl_context *ctx ) _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, NULL); + _mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer, NULL); + for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) { _mesa_reference_buffer_object(ctx, &ctx->UniformBufferBindings[i].BufferObject,