Commit 75018d0d48028b6eb34d2f420cde12887d7a80e4

Con Kolivas 2011-08-20T22:22:11

Release cl resources should the gpu mining thread abort.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/main.c b/main.c
index 5549644..89b99ec 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);