Commit 1e5035497bf362d1e9484e889dc769eec1e62fcc

Con Kolivas 2012-01-28T16:29:19

Retain cl program after every possible place we might build the program.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/ocl.c b/ocl.c
index 28d5a87..7e16f60 100644
--- a/ocl.c
+++ b/ocl.c
@@ -639,6 +639,12 @@ built:
 			applog(LOG_INFO, "%s", log);
 			return NULL;
 		}
+
+		clRetainProgram(clState->program);
+		if (status != CL_SUCCESS) {
+			applog(LOG_ERR, "Error: Retaining Program (clRetainProgram)");
+			return NULL;
+		}
 	}
 
 	/* get a kernel object handle for a kernel with the given name */