From 75018d0d48028b6eb34d2f420cde12887d7a80e4 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 20 Aug 2011 22:22:11 +1000 Subject: [PATCH] Release cl resources should the gpu mining thread abort. --- main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.c b/main.c index 5549644e..89b99ec1 100644 --- a/main.c +++ b/main.c @@ -3725,6 +3725,11 @@ static void *gpuminer_thread(void *userdata) } } out: + clReleaseCommandQueue(clState->commandQueue); + clReleaseKernel(clState->kernel); + clReleaseProgram(clState->program); + clReleaseContext(clState->context); + thread_reportin(mythr); applog(LOG_ERR, "Thread %d failure, exiting", thr_id); tq_freeze(mythr->q);