Commit ef0c6d9b authored by Timo Rothenpieler's avatar Timo Rothenpieler

libavutil/opencl: fix potential null dereference

Fixes CID 1396840
Reviewed-by: 's avatarWei Gao <highgod0401@gmail.com>
Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
parent aa26258f
......@@ -169,7 +169,7 @@ const char *av_opencl_errstr(cl_int status)
static void free_device_list(AVOpenCLDeviceList *device_list)
{
int i, j;
if (!device_list)
if (!device_list || !device_list->platform_node)
return;
for (i = 0; i < device_list->platform_num; i++) {
if (!device_list->platform_node[i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment