st/nine: plug thread related leaks
authorAndre Heider <a.heider@gmail.com>
Tue, 6 Nov 2018 08:27:13 +0000 (09:27 +0100)
committerAxel Davy <davyaxel0@gmail.com>
Fri, 9 Nov 2018 21:37:27 +0000 (22:37 +0100)
Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/nine_queue.c
src/gallium/state_trackers/nine/nine_state.c

index 7a85798f0f4109c85fed9e0bcfb5751f39bfefe1..c09810b1a8a5abcb072f959d9d80d5d16e2b7dbb 100644 (file)
@@ -265,8 +265,12 @@ void
 nine_queue_delete(struct nine_queue_pool *ctx)
 {
     unsigned i;
+
     mtx_destroy(&ctx->mutex_pop);
+    cnd_destroy(&ctx->event_pop);
+
     mtx_destroy(&ctx->mutex_push);
+    cnd_destroy(&ctx->event_push);
 
     for (i = 0; i < NINE_CMD_BUFS; i++)
         FREE(ctx->pool[i].mem_pool);
index 74aaf57a549f9d62d88129fe94d78ff8a707eb85..273be88e2b81f293246eacdf1f57b072ae4f3638 100644 (file)
@@ -234,7 +234,12 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
 
     nine_csmt_wait_processed(ctx);
     nine_queue_delete(ctx->pool);
+
+    mtx_destroy(&ctx->thread_resume);
+    mtx_destroy(&ctx->thread_running);
+
     mtx_destroy(&ctx->mutex_processed);
+    cnd_destroy(&ctx->event_processed);
 
     FREE(ctx);