From: Jakob Bornecrantz Date: Mon, 16 Mar 2009 19:57:34 +0000 (+0100) Subject: trace: Fix memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b95789ddb9ae0d8284349c6a2bb677a5b4b5573f;p=mesa.git trace: Fix memory leak --- diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index c5bae0eed20..c8949729047 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -878,8 +878,9 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe, for (i = 0; i < num_buffers; i++) _buffers[i].buffer = trace_buffer_unwrap(tr_ctx, buffers[i].buffer); pipe->set_vertex_buffers(pipe, num_buffers, _buffers); + free(_buffers); } else { - pipe->set_vertex_buffers(pipe, num_buffers, buffers); + pipe->set_vertex_buffers(pipe, num_buffers, NULL); } trace_dump_call_end();