Commit f0c6f282 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Fix a memory leak

parent 1a41a538
......@@ -1997,8 +1997,11 @@ panfrost_set_vertex_buffers(
ctx->vertex_buffer_count = num_buffers;
memcpy(ctx->vertex_buffers, buffers, sz);
} else {
/* XXX leak */
ctx->vertex_buffers = NULL;
if (ctx->vertex_buffers) {
free(ctx->vertex_buffers);
ctx->vertex_buffers = NULL;
}
ctx->vertex_buffer_count = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment