trace: Fix memory leak
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 16 Mar 2009 19:57:34 +0000 (20:57 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Mon, 16 Mar 2009 20:34:03 +0000 (21:34 +0100)
src/gallium/drivers/trace/tr_context.c

index c5bae0eed20fe30404c0336dc36e86973efed297..c8949729047840a7144f34167c45dee05131fab5 100644 (file)
@@ -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();