Browse Source

Release cl resources should the gpu mining thread abort.

Con Kolivas 14 years ago
parent
commit
75018d0d48
1 changed files with 5 additions and 0 deletions
  1. 5 0
      main.c

+ 5 - 0
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);