vtest: use vtest_destroy_context to cleanup

struct vtest_context is about to get more complex.  Use
vtest_destroy_context so that we have a single point that does context
destruction.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Isaac Bosompem <mrisaacb@google.com>
macos/master
Chia-I Wu 4 years ago
parent d3fd5413c1
commit 654771bca1
  1. 4
      vtest/vtest_renderer.c

@ -278,9 +278,7 @@ void vtest_cleanup_renderer(void)
struct vtest_context *ctx, *tmp;
LIST_FOR_EACH_ENTRY_SAFE(ctx, tmp, &renderer.active_contexts, head) {
virgl_renderer_context_destroy(ctx->ctx_id);
util_hash_table_clear(ctx->resource_table);
vtest_free_context(ctx, true);
vtest_destroy_context(ctx);
}
LIST_FOR_EACH_ENTRY_SAFE(ctx, tmp, &renderer.free_contexts, head) {
vtest_free_context(ctx, true);

Loading…
Cancel
Save