mirror of https://git.ffmpeg.org/ffmpeg.git
libavutil/opencl: fix potential null dereference
Fixes CID 1396840 Reviewed-by: Wei Gao <highgod0401@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
parent
aa26258faa
commit
ef0c6d9b01
|
@ -169,7 +169,7 @@ const char *av_opencl_errstr(cl_int status)
|
||||||
static void free_device_list(AVOpenCLDeviceList *device_list)
|
static void free_device_list(AVOpenCLDeviceList *device_list)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
if (!device_list)
|
if (!device_list || !device_list->platform_node)
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < device_list->platform_num; i++) {
|
for (i = 0; i < device_list->platform_num; i++) {
|
||||||
if (!device_list->platform_node[i])
|
if (!device_list->platform_node[i])
|
||||||
|
|
Loading…
Reference in New Issue