Fix a crash when clSetKernelArg of parameter point to NULL value.
authorYang Rong <rong.r.yang@intel.com>
Mon, 19 May 2014 05:52:19 +0000 (13:52 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Mon, 19 May 2014 04:46:56 +0000 (12:46 +0800)
commit065cf032a7df7e72d0c90a7cd894f2de9f001255
treebd412a526a879f8969c6ddf8524334a4b2412cb3
parent2cfa1d3e30f276b0f50f97b2fa661f31289acd2b
Fix a crash when clSetKernelArg of parameter point to NULL value.

Per OCL spec, if the arg_value of clSetKernelArg is a memory object, it can be
NULL or point to NULL. Driver only handle NULL case, will crash if point to NULL.
Correct it.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Junyan He <junyan.he@inbox.com>
src/cl_kernel.c