summaryrefslogtreecommitdiff
path: root/libavutil/opencl.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-06-11 16:05:45 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2017-08-27 21:08:17 +0200
commitef0c6d9b01de773e5a1177de5fcbb981aac44d65 (patch)
tree76246bde2f7a1d22f0e7fe6b6a2253a10c33efdd /libavutil/opencl.c
parentaa26258faa9704b144dfe5bc5d263a1332d7a9dd (diff)
libavutil/opencl: fix potential null dereference
Fixes CID 1396840 Reviewed-by: Wei Gao <highgod0401@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavutil/opencl.c')
-rw-r--r--libavutil/opencl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index af35770e06..202756516b 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -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])